<?php
$sql="
CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_ad` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `bgcolor` varchar(10) NOT NULL,
  `title` varchar(200) NOT NULL,
  `title_text` varchar(50) NOT NULL,
  `title_desc` varchar(100) NOT NULL,
  `cateid` int(11) NOT NULL,
  `thumb` varchar(255) NOT NULL,
  `adtype` int(2) NOT NULL DEFAULT '0',
  `is_ios` int(2) NOT NULL DEFAULT '0',
  `elmwm_act_id` varchar(32) NOT NULL,
  `mtpic` int(2) NOT NULL DEFAULT '0',
  `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型',
  `appid` varchar(64) NOT NULL,
  `path` varchar(2000) NOT NULL,
  `url` varchar(2000) NOT NULL,
  `reply_thumb` varchar(255) DEFAULT '',
  `reply_text` varchar(500) DEFAULT NULL,
  `displayorder` int(11) NOT NULL DEFAULT '0',
  `is_show` int(2) NOT NULL DEFAULT '0',
  `link_title` varchar(50) NOT NULL,
  `link_desc` varchar(50) NOT NULL,
  `link_thumb` varchar(256) NOT NULL,
  `link_url` varchar(255) NOT NULL,
  `waimaitt_list_bgcolor` varchar(10) NOT NULL,
  `waimaitt_list_leftupicon` varchar(255) NOT NULL,
  `waimaitt_list_leftdownicon` varchar(255) NOT NULL,
  `waimaitt_list_jine` varchar(10) NOT NULL,
  `waimaitt_list_jineunit` varchar(10) NOT NULL,
  `waimaitt_list_jinerighttext` varchar(30) NOT NULL,
  `waimaitt_list_lingqutext` varchar(20) NOT NULL,
  `waimaitt_list_lingqucolor` varchar(10) NOT NULL,
  `waimaitt_list_lingqubgcolor` varchar(10) NOT NULL,
  `width` varchar(100) NOT NULL,
  `height` varchar(100) NOT NULL,
  `tplid` varchar(500) NOT NULL,
  `meituantype` int(2) NOT NULL DEFAULT '0',
  `style` int(2) NOT NULL DEFAULT '0',
  `appid_type2` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型',
  `cateid2` int(2) NOT NULL DEFAULT '0',
  `is_warm` int(2) NOT NULL DEFAULT '1',
  `pic_style` varchar(100) NOT NULL,
  `mall_thumb` varchar(255) NOT NULL,
  `mall_is_show` int(2) NOT NULL DEFAULT '0',
  `mall_adtype` int(2) NOT NULL DEFAULT '0',
  `banner_color` varchar(64) NOT NULL,
  `mall_type` varchar(20) NOT NULL,
  `banner_color2` varchar(64) NOT NULL,
  `huodong_banner` varchar(255) NOT NULL,
  `huodong_banner_style` varchar(100) NOT NULL,
  `open_thumb` varchar(255) NOT NULL,
  `goods_id` varchar(255) NOT NULL,
  `system_type` int(2) NOT NULL DEFAULT '0',
  `mall_index_all` int(2) NOT NULL DEFAULT '0',
  `tplid_oneday_num` int(4) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`),
  KEY `is_show` (`is_show`)
) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_ad_new` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `bgcolor` varchar(10) NOT NULL,
  `title` varchar(200) NOT NULL,
  `title_text` varchar(50) NOT NULL,
  `title_desc` varchar(100) NOT NULL,
  `cateid` int(11) NOT NULL,
  `thumb` varchar(255) NOT NULL,
  `adtype` int(2) NOT NULL DEFAULT '0',
  `is_ios` int(2) NOT NULL DEFAULT '0',
  `elmwm_act_id` varchar(32) NOT NULL,
  `mtpic` int(2) NOT NULL DEFAULT '0',
  `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型',
  `appid` varchar(64) NOT NULL,
  `path` varchar(2000) NOT NULL,
  `url` varchar(2000) NOT NULL,
  `reply_thumb` varchar(255) DEFAULT '',
  `reply_text` varchar(500) DEFAULT NULL,
  `displayorder` int(11) NOT NULL DEFAULT '0',
  `is_show` int(2) NOT NULL DEFAULT '0',
  `link_title` varchar(50) NOT NULL,
  `link_desc` varchar(50) NOT NULL,
  `link_thumb` varchar(256) NOT NULL,
  `link_url` varchar(255) NOT NULL,
  `waimaitt_list_bgcolor` varchar(10) NOT NULL,
  `waimaitt_list_leftupicon` varchar(255) NOT NULL,
  `waimaitt_list_leftdownicon` varchar(255) NOT NULL,
  `waimaitt_list_jine` varchar(10) NOT NULL,
  `waimaitt_list_jineunit` varchar(10) NOT NULL,
  `waimaitt_list_jinerighttext` varchar(30) NOT NULL,
  `waimaitt_list_lingqutext` varchar(20) NOT NULL,
  `waimaitt_list_lingqucolor` varchar(10) NOT NULL,
  `waimaitt_list_lingqubgcolor` varchar(10) NOT NULL,
  `width` varchar(100) NOT NULL,
  `height` varchar(100) NOT NULL,
  `tplid` varchar(500) NOT NULL,
  `meituantype` int(2) NOT NULL DEFAULT '0',
  `style` int(2) NOT NULL DEFAULT '0',
  `appid_type2` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型',
  `cateid2` int(2) NOT NULL DEFAULT '0',
  `is_warm` int(2) NOT NULL DEFAULT '1',
  `pic_style` varchar(100) NOT NULL,
  `mall_thumb` varchar(255) NOT NULL,
  `mall_is_show` int(2) NOT NULL DEFAULT '0',
  `mall_adtype` int(2) NOT NULL DEFAULT '0',
  `banner_color` varchar(64) NOT NULL,
  `mall_type` varchar(20) NOT NULL,
  `huodong_banner` varchar(255) NOT NULL,
  `banner_color2` varchar(64) NOT NULL,
  `huodong_banner_style` varchar(100) NOT NULL,
  `open_thumb` varchar(255) NOT NULL,
  `goods_id` varchar(255) NOT NULL,
  `system_type` int(2) NOT NULL DEFAULT '0',
  `mall_index_all` int(2) NOT NULL DEFAULT '0',
  `tplid_oneday_num` int(4) NOT NULL DEFAULT '1',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`),
  KEY `is_show` (`is_show`)
) ENGINE=MyISAM AUTO_INCREMENT=86 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_ad_new_temp` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `bgcolor` varchar(10) NOT NULL,
  `title` varchar(200) NOT NULL,
  `title_text` varchar(50) NOT NULL,
  `title_desc` varchar(100) NOT NULL,
  `cateid` int(11) NOT NULL,
  `thumb` varchar(255) NOT NULL,
  `adtype` int(2) NOT NULL DEFAULT '0',
  `is_ios` int(2) NOT NULL DEFAULT '0',
  `elmwm_act_id` varchar(32) NOT NULL,
  `mtpic` int(2) NOT NULL DEFAULT '0',
  `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型',
  `appid` varchar(64) NOT NULL,
  `path` varchar(2000) NOT NULL,
  `url` varchar(2000) DEFAULT '',
  `reply_thumb` varchar(255) DEFAULT '',
  `reply_text` varchar(500) DEFAULT NULL,
  `displayorder` int(11) NOT NULL DEFAULT '0',
  `is_show` int(2) NOT NULL DEFAULT '0',
  `link_title` varchar(50) NOT NULL,
  `link_desc` varchar(50) NOT NULL,
  `link_thumb` varchar(256) NOT NULL,
  `link_url` varchar(255) NOT NULL,
  `waimaitt_list_bgcolor` varchar(10) NOT NULL,
  `waimaitt_list_leftupicon` varchar(255) NOT NULL,
  `waimaitt_list_leftdownicon` varchar(255) NOT NULL,
  `waimaitt_list_jine` varchar(10) NOT NULL,
  `waimaitt_list_jineunit` varchar(10) NOT NULL,
  `waimaitt_list_jinerighttext` varchar(30) NOT NULL,
  `waimaitt_list_lingqutext` varchar(20) NOT NULL,
  `waimaitt_list_lingqucolor` varchar(10) NOT NULL,
  `waimaitt_list_lingqubgcolor` varchar(10) NOT NULL,
  `width` varchar(100) NOT NULL,
  `height` varchar(100) NOT NULL,
  `tplid` varchar(500) NOT NULL,
  `meituantype` int(2) NOT NULL DEFAULT '0',
  `style` int(2) NOT NULL DEFAULT '0',
  `appid_type2` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型',
  `cateid2` int(2) NOT NULL DEFAULT '0',
  `is_warm` int(2) NOT NULL DEFAULT '0',
  `pic_style` varchar(100) NOT NULL,
  `mall_thumb` varchar(255) NOT NULL,
  `mall_is_show` int(2) NOT NULL DEFAULT '0',
  `mall_adtype` int(2) NOT NULL DEFAULT '0',
  `banner_color` varchar(64) NOT NULL,
  `mall_type` varchar(20) NOT NULL,
  `huodong_banner` varchar(255) NOT NULL,
  `banner_color2` varchar(64) NOT NULL,
  `huodong_banner_style` varchar(100) NOT NULL,
  `open_thumb` varchar(255) NOT NULL,
  `goods_id` varchar(255) NOT NULL,
  `system_type` int(2) NOT NULL DEFAULT '0',
  `mall_index_all` int(2) NOT NULL DEFAULT '0',
  `tplid_oneday_num` int(4) NOT NULL DEFAULT '1',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`),
  KEY `is_show` (`is_show`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_ad_u` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `bgcolor` varchar(10) NOT NULL,
  `title` varchar(200) NOT NULL,
  `title_text` varchar(50) NOT NULL,
  `title_desc` varchar(100) NOT NULL,
  `cateid` int(11) NOT NULL,
  `thumb` varchar(255) NOT NULL,
  `adtype` int(2) NOT NULL DEFAULT '0',
  `is_ios` int(2) NOT NULL DEFAULT '0',
  `elmwm_act_id` varchar(32) NOT NULL,
  `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型',
  `appid` varchar(64) NOT NULL,
  `path` varchar(2000) NOT NULL,
  `url` varchar(2000) NOT NULL,
  `reply_thumb` varchar(255) DEFAULT '',
  `reply_text` varchar(500) DEFAULT NULL,
  `displayorder` int(11) NOT NULL DEFAULT '0',
  `is_show` int(2) NOT NULL DEFAULT '0',
  `link_title` varchar(50) NOT NULL,
  `link_desc` varchar(50) NOT NULL,
  `link_thumb` varchar(256) NOT NULL,
  `link_url` varchar(255) NOT NULL,
  `waimaitt_list_bgcolor` varchar(10) NOT NULL,
  `waimaitt_list_leftupicon` varchar(255) NOT NULL,
  `waimaitt_list_leftdownicon` varchar(255) NOT NULL,
  `waimaitt_list_jine` varchar(10) NOT NULL,
  `waimaitt_list_jineunit` varchar(10) NOT NULL,
  `waimaitt_list_jinerighttext` varchar(30) NOT NULL,
  `waimaitt_list_lingqutext` varchar(20) NOT NULL,
  `waimaitt_list_lingqucolor` varchar(10) NOT NULL,
  `waimaitt_list_lingqubgcolor` varchar(10) NOT NULL,
  `width` varchar(100) NOT NULL,
  `height` varchar(100) NOT NULL,
  `tplid` varchar(500) NOT NULL,
  `meituantype` int(2) NOT NULL DEFAULT '0',
  `style` int(2) NOT NULL DEFAULT '0',
  `appid_type2` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型',
  `cateid2` int(2) NOT NULL DEFAULT '0',
  `is_warm` int(2) NOT NULL DEFAULT '1',
  `pic_style` varchar(100) NOT NULL,
  `mall_thumb` varchar(255) NOT NULL,
  `mall_is_show` int(2) NOT NULL DEFAULT '0',
  `mall_adtype` int(2) NOT NULL DEFAULT '0',
  `banner_color` varchar(64) NOT NULL,
  `mall_type` varchar(20) NOT NULL,
  `banner_color2` varchar(64) NOT NULL,
  `huodong_banner` varchar(255) NOT NULL,
  `huodong_banner_style` varchar(100) NOT NULL,
  `open_thumb` varchar(255) NOT NULL,
  `goods_id` varchar(255) NOT NULL,
  `system_type` int(2) NOT NULL DEFAULT '0',
  `mall_index_all` int(2) NOT NULL DEFAULT '0',
  `tplid_oneday_num` int(4) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`),
  KEY `is_show` (`is_show`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_api` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `apisecret` varchar(64) DEFAULT NULL COMMENT 'apisecret',
  `type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT 'api类型，1为美团2为电影票',
  `money_qrcode` varchar(256) DEFAULT NULL COMMENT '收款二维码',
  `wxno` varchar(50) DEFAULT NULL COMMENT '微信号',
  `alipayno` varchar(50) DEFAULT NULL COMMENT '支付宝号',
  `realname` varchar(50) DEFAULT NULL COMMENT '真实姓名',
  `mobile` varchar(20) NOT NULL COMMENT '手机号码',
  `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '账户余额',
  `meituan_rate` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '美团结算比例',
  `movie_rate` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '电影票结算比例',
  `meituan_apikey` varchar(64) DEFAULT NULL COMMENT '美团官方api秘钥',
  `meituan_appkey` varchar(64) DEFAULT NULL COMMENT '美团官方媒体Appkey',
  `meituan_name` varchar(64) DEFAULT NULL COMMENT '美团官方渠道标识',
  `movie_platformId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '电影票平台id',
  `movie_secret` varchar(64) DEFAULT NULL COMMENT '电影票接口秘钥',
  `movie_subplatformId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '电影票渠道id',
  `status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '状态',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  `displayorder` int(11) unsigned NOT NULL COMMENT '排序',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_api_cashlogs` (
  `log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(11) NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `user_id` int(11) NOT NULL COMMENT '用户ID',
  `openid` varchar(64) NOT NULL COMMENT 'openid',
  `unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `num` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变动金额',
  `reason` varchar(32) DEFAULT NULL COMMENT '变动事由',
  `order_id` varchar(50) NOT NULL COMMENT '订单号',
  `type` int(2) NOT NULL COMMENT 'c_1_2_3_t',
  `create_time` int(11) unsigned NOT NULL COMMENT '变动时间',
  PRIMARY KEY (`log_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_apicash` (
  `cash_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `user_id` int(11) unsigned NOT NULL COMMENT '用户ID',
  `openid` varchar(64) NOT NULL COMMENT 'openid',
  `unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `alipayno` varchar(50) DEFAULT NULL COMMENT '支付宝号',
  `realname` varchar(50) DEFAULT NULL COMMENT '真实姓名',
  `num` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '提现额度',
  `billno` varchar(32) DEFAULT NULL COMMENT '流水号',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '支付状态',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`cash_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_cash` (
  `cash_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `user_id` int(11) unsigned NOT NULL COMMENT '用户ID',
  `openid` varchar(64) NOT NULL COMMENT 'openid',
  `unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `alipayno` varchar(50) DEFAULT NULL COMMENT '支付宝号',
  `realname` varchar(50) DEFAULT NULL COMMENT '真实姓名',
  `mobile` varchar(20) NOT NULL COMMENT '手机号码',
  `money_qrcode` varchar(256) DEFAULT NULL COMMENT '收款二维码',
  `reason` varchar(50) NOT NULL COMMENT '拒绝原因',
  `num` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '提现额度',
  `billno` varchar(32) DEFAULT NULL COMMENT '流水号',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '支付状态',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`cash_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_cash_u` (
  `cash_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `user_id` int(11) unsigned NOT NULL COMMENT '用户ID',
  `openid` varchar(64) NOT NULL COMMENT 'openid',
  `unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `alipayno` varchar(50) DEFAULT NULL COMMENT '支付宝号',
  `realname` varchar(50) DEFAULT NULL COMMENT '真实姓名',
  `mobile` varchar(20) NOT NULL COMMENT '手机号码',
  `money_qrcode` varchar(256) DEFAULT NULL COMMENT '收款二维码',
  `reason` varchar(50) NOT NULL COMMENT '拒绝原因',
  `num` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '提现额度',
  `billno` varchar(32) DEFAULT NULL COMMENT '流水号',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '支付状态',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`cash_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_cinema` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cinemaId` int(10) unsigned NOT NULL COMMENT '电影院id',
  `cityId` int(10) unsigned NOT NULL COMMENT '城市id',
  `cinemaName` varchar(64) NOT NULL COMMENT '电影院名',
  `address` varchar(256) NOT NULL COMMENT '厅名',
  `latitude` double DEFAULT NULL COMMENT 'lat',
  `longitude` double DEFAULT NULL COMMENT 'lon',
  `phone` varchar(20) NOT NULL COMMENT '影院电话',
  `regionName` varchar(32) NOT NULL COMMENT '地区',
  `shows` mediumtext COMMENT '场次信息',
  `update_time` int(11) unsigned NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `cinemaId` (`cinemaId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_item` (
  `item_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `shop_id` int(11) unsigned NOT NULL COMMENT '商户ID',
  `title` varchar(256) NOT NULL COMMENT '商品标题',
  `desc` varchar(512) DEFAULT NULL COMMENT '描述',
  `price` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '销售价格',
  `market_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '划线价格',
  `click` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '点击量',
  `photos` text COMMENT '商品图片',
  `banner` varchar(256) DEFAULT NULL COMMENT '弹出横幅',
  `details` text COMMENT '商品详情',
  `details2` text COMMENT '商品详情',
  `sold` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '浏览次数',
  `stock` int(11) unsigned NOT NULL DEFAULT '99' COMMENT '商品库存',
  `remark` varchar(128) DEFAULT NULL COMMENT '备注提示语',
  `appid` varchar(64) DEFAULT NULL,
  `path` varchar(128) DEFAULT NULL,
  `is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
  `is_audit` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否审核',
  `is_sale` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否上架',
  `is_matter` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否实物',
  `sort` smallint(4) unsigned NOT NULL DEFAULT '0' COMMENT '排序数字',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  `cateid` int(10) NOT NULL DEFAULT '0',
  `audit_text` varchar(128) NOT NULL,
  `edit_openid` varchar(64) NOT NULL,
  `chk_openid` varchar(64) NOT NULL,
  PRIMARY KEY (`item_id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_item_order` (
  `order_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `orderid` varchar(32) NOT NULL COMMENT '订单ID',
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `openid` varchar(64) NOT NULL COMMENT 'openid',
  `unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `shop_id` int(11) unsigned NOT NULL COMMENT '商户ID',
  `item_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预约商品',
  `user_id` int(11) unsigned NOT NULL COMMENT '用户ID',
  `num` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '购买数量',
  `price` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付费用',
  `market_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '划线价格',
  `name` varchar(64) DEFAULT NULL COMMENT '姓名',
  `mobile` varchar(16) DEFAULT NULL COMMENT '手机号码',
  `address` varchar(80) DEFAULT NULL COMMENT '地址',
  `remark` varchar(256) DEFAULT NULL COMMENT '备注',
  `courier_name` varchar(40) DEFAULT NULL COMMENT '快递公司',
  `courier_number` varchar(20) DEFAULT NULL COMMENT '快递单号',
  `delivery_time` int(11) unsigned NOT NULL COMMENT '发货时间',
  `complete_time` int(11) unsigned NOT NULL COMMENT '完成时间',
  `reback` text COMMENT '发货备注',
  `is_over` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否处理',
  `is_settle` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pay_status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '订单支付状态',
  `pay_time` int(11) unsigned NOT NULL COMMENT '订单支付时间',
  `uniontid` varchar(32) NOT NULL COMMENT '商户订单号',
  `trans_id` varchar(32) NOT NULL COMMENT '支付流水号',
  `pay_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '付款类型：1积分2现金3积分+现金4赠送5抽奖',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`order_id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_itemcate` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `shop_id` int(11) DEFAULT '0',
  `catename` varchar(50) DEFAULT NULL,
  `thumb` varchar(255) DEFAULT '',
  `displayorder` int(11) DEFAULT '0',
  `enabled` int(11) DEFAULT '0',
  `cattype` tinyint(1) NOT NULL,
  `erji` text NOT NULL,
  `fid` int(11) NOT NULL,
  `pingon` tinyint(1) NOT NULL,
  `editpingon` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_kefubind` (
  `bind_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `openid` varchar(64) NOT NULL COMMENT '用户OPENID',
  `active_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '活跃时间',
  `type` varchar(10) DEFAULT NULL,
  `ad_id` int(10) NOT NULL DEFAULT '0',
  `link_title` varchar(64) NOT NULL COMMENT '图文标题',
  `link_desc` varchar(64) NOT NULL COMMENT '图文描述',
  `link_thumb` varchar(256) NOT NULL COMMENT '图文图片',
  `link_url` varchar(256) NOT NULL COMMENT '图文链接',
  `content` text COMMENT '内容',
  PRIMARY KEY (`bind_id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_kefubind_u` (
  `bind_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `openid` varchar(64) NOT NULL COMMENT '用户OPENID',
  `active_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '活跃时间',
  `type` varchar(10) DEFAULT NULL,
  `ad_id` int(10) NOT NULL DEFAULT '0',
  `link_title` varchar(64) NOT NULL COMMENT '图文标题',
  `link_desc` varchar(64) NOT NULL COMMENT '图文描述',
  `link_thumb` varchar(256) NOT NULL COMMENT '图文图片',
  `link_url` varchar(256) NOT NULL COMMENT '图文链接',
  `content` text COMMENT '内容',
  PRIMARY KEY (`bind_id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_movieapi` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `apisecret` varchar(64) DEFAULT NULL COMMENT 'apisecret',
  `wxno` varchar(50) DEFAULT NULL COMMENT '微信号',
  `alipayno` varchar(50) DEFAULT NULL COMMENT '支付宝号',
  `realname` varchar(50) DEFAULT NULL COMMENT '真实姓名',
  `mobile` varchar(20) NOT NULL COMMENT '手机号码',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_movieorder` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `user_id` int(11) unsigned NOT NULL COMMENT '用户id',
  `openid` varchar(64) NOT NULL COMMENT '用户OPENID',
  `unionid` varchar(64) DEFAULT NULL COMMENT '用户unionid',
  `api_appKey` varchar(20) NOT NULL COMMENT 'api_appKey',
  `appKey` varchar(20) NOT NULL COMMENT '下单appKey',
  `userOrderId` varchar(64) NOT NULL COMMENT '用户方的订单号',
  `thirdOrderId` varchar(64) NOT NULL COMMENT '接入方的订单号',
  `orderStatus` varchar(10) NOT NULL COMMENT '订单状态：2-受理中，3-待出票，4-已出票待结算，5-已结算，10-订单关闭',
  `orderStatusStr` varchar(64) NOT NULL COMMENT '订单状态说明',
  `initPrice` int(10) unsigned NOT NULL COMMENT '订单市场价：分',
  `orderPrice` int(10) unsigned NOT NULL COMMENT '订单成本价：分，接入方可拿次字段作为下单成本价',
  `realorderPrice` int(10) unsigned NOT NULL COMMENT '平台方订单成本价',
  `callbacktime` int(11) unsigned NOT NULL COMMENT '平台方订单状态回调时间',
  `filmId` int(10) unsigned NOT NULL COMMENT '影片id',
  `filmName` varchar(32) NOT NULL COMMENT '片名',
  `filmPic` varchar(256) NOT NULL COMMENT '影片图片',
  `cinemaId` int(10) unsigned NOT NULL COMMENT '电影院id',
  `cinemaName` varchar(64) NOT NULL COMMENT '电影院名',
  `cinemaAddress` varchar(256) NOT NULL COMMENT '电影院地址',
  `hallName` varchar(64) NOT NULL COMMENT '厅名',
  `showTime` varchar(32) NOT NULL COMMENT '放映时间',
  `stopSellTime` varchar(32) NOT NULL COMMENT '停售时间',
  `showId` varchar(128) NOT NULL COMMENT '场次id',
  `seat` varchar(256) NOT NULL COMMENT '座位：英文逗号隔开',
  `seatId` varchar(512) NOT NULL COMMENT '座位ID：|隔开',
  `seatArea` varchar(64) NOT NULL COMMENT '座位区域：|隔开',
  `seatNo` varchar(256) NOT NULL COMMENT '座位：|隔开',
  `realSeat` varchar(256) NOT NULL COMMENT '实际座位：英文逗号隔开',
  `ticketCode` text COMMENT '取票码',
  `ticketImage` text COMMENT '取票二维码',
  `orderNum` varchar(10) NOT NULL COMMENT '座位数',
  `reservedPhone` varchar(11) NOT NULL COMMENT '下单预留手机号码',
  `acceptChangeSeat` int(2) unsigned NOT NULL COMMENT '是否允许调座1允许0不允许',
  `createTime` varchar(32) NOT NULL COMMENT '下单时间',
  `readyTicketTime` varchar(32) NOT NULL COMMENT '待出票时间',
  `ticketTime` varchar(32) NOT NULL COMMENT '出票时间',
  `closeTime` varchar(32) NOT NULL COMMENT '关闭时间',
  `closeCause` varchar(64) NOT NULL COMMENT '关闭原因',
  `ticektCode` text COMMENT '取票码，type为1时，为字符串，type为2时，为取票码原始截图。 理论上一个取票码包含各字符串和原始截图， 原始截图可能不和字符串同步返回，有滞后性。',
  `pay_status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '订单支付状态',
  `third` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '1为已发送到第三方出票',
  `pay_time` int(11) unsigned NOT NULL COMMENT '订单支付时间',
  `uniontid` varchar(32) NOT NULL COMMENT '商户订单号',
  `trans_id` varchar(32) NOT NULL COMMENT '支付流水号',
  `downDiscountRate` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '小于39元成本折扣',
  `upDiscountRate` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '大于39元成本折扣',
  PRIMARY KEY (`id`),
  UNIQUE KEY `thirdOrderId` (`thirdOrderId`),
  UNIQUE KEY `userOrderId` (`userOrderId`)
) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_newposter` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `title` varchar(255) DEFAULT '' COMMENT '标题',
  `bg` varchar(255) DEFAULT '' COMMENT '背景',
  `data` text COMMENT '位置数据',
  `isopen` tinyint(3) DEFAULT '0' COMMENT '是否开启',
  `createtime` int(11) DEFAULT '0' COMMENT '时间',
  `type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '1为海报2为商品',
  `poster_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '海报类型',
  `cateid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '海报分类',
  `shop_id` int(11) DEFAULT '0',
  `content` varchar(500) DEFAULT NULL COMMENT '海报文案',
  `xcx_path` varchar(500) DEFAULT NULL COMMENT '小程序路径',
  `gzh_reply_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '公众号回复类型',
  `link_title` varchar(50) NOT NULL COMMENT 'H5图文链接标题',
  `link_desc` varchar(50) NOT NULL COMMENT 'H5图文链接描述文字',
  `link_thumb` varchar(256) NOT NULL COMMENT 'H5图文链接图片',
  `link_url` varchar(500) NOT NULL COMMENT 'H5图文链接URL',
  `card_title` varchar(50) NOT NULL COMMENT '小程序卡片标题',
  `card_path` varchar(50) NOT NULL COMMENT '小程序卡片路径',
  `card_thumb` varchar(256) NOT NULL COMMENT '小程序卡片图片',
  `mall_type` varchar(20) NOT NULL COMMENT '电商平台',
  `goods_id` varchar(256) NOT NULL COMMENT '商品id',
  `goods_title` varchar(200) NOT NULL,
  `goods_desc` varchar(100) NOT NULL,
  `goods_photos` varchar(3000) NOT NULL COMMENT '商品图片',
  `is_gzh` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否关注公众号显示',
  `is_tjr` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否有推荐人显示',
  `system_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '手机平台',
  `shopavatar` varchar(256) NOT NULL COMMENT '平台图标',
  `shopname` varchar(50) NOT NULL COMMENT '平台名称',
  `replay_text` text COMMENT '回复文字内容',
  `keyword` varchar(255) DEFAULT '' COMMENT '触发关键词',
  `url_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'H5链接内容id',
  `goods_photo` varchar(256) NOT NULL COMMENT '商品本地图片',
  `waittext` varchar(255) DEFAULT '' COMMENT '海报等待文字',
  `oktext` varchar(255) DEFAULT '' COMMENT '海报成功文字',
  `sub_sendval` text COMMENT '回复文字内容',
  `goods_replay_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '公众号回复类型',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=337 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) NOT NULL DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `pingtai` varchar(20) NOT NULL COMMENT '平台',
  `pingtai_name` varchar(20) NOT NULL COMMENT '平台名',
  `order_type` varchar(20) NOT NULL COMMENT '订单类型',
  `order_status` int(3) NOT NULL DEFAULT '0' COMMENT '订单状态',
  `order_id` varchar(50) NOT NULL COMMENT '子订单号',
  `order_id_fa` varchar(50) NOT NULL COMMENT '主订单号',
  `goods_id` varchar(50) NOT NULL COMMENT '商品id',
  `order_create_time` varchar(10) NOT NULL COMMENT '订单创建时间',
  `order_paid_time` varchar(10) NOT NULL COMMENT '订单付款时间',
  `billingDate` varchar(10) NOT NULL COMMENT '分销联盟账期时间',
  `tk_earning_time` varchar(10) NOT NULL COMMENT '淘宝订单结算时间',
  `order_settlement_time` varchar(10) NOT NULL COMMENT '订单结算时间',
  `shopname` varchar(30) NOT NULL COMMENT '店铺名',
  `goods_title` varchar(255) NOT NULL,
  `goods_img` varchar(255) NOT NULL COMMENT '商品图片',
  `order_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单金额',
  `order_profit` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单佣金',
  `sid` varchar(20) NOT NULL COMMENT '订单侠渠道标识',
  `adzone_id` varchar(20) NOT NULL COMMENT 'pid=mm_1_2_3中的“3”这段数字',
  `site_id` varchar(20) NOT NULL COMMENT 'pid=mm_1_2_3中的“2”这段数字',
  `relation_id` varchar(20) NOT NULL COMMENT '渠道id',
  `alimama_rate` varchar(20) NOT NULL COMMENT '阿里妈妈技术服务费比例',
  `income_rate` varchar(20) NOT NULL COMMENT '佣金比例',
  `c_1` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '自买佣金',
  `c_1_uid` int(11) NOT NULL DEFAULT '0' COMMENT '自买UID',
  `c_1_unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `c_2` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '一级佣金',
  `c_2_uid` int(11) NOT NULL DEFAULT '0' COMMENT '一级UID',
  `c_2_unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `c_3` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '二级佣金',
  `c_3_uid` int(11) NOT NULL DEFAULT '0' COMMENT '二级UID',
  `c_3_unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `c_t` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_t_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c_2t` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_2t_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c_1h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_1h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c_2h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_2h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c_3h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_3h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c_4h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_4h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c_t_unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `c_h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c1_uid` int(11) NOT NULL DEFAULT '0' COMMENT '自买UID',
  `new` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `is_notice` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否通知',
  `order_finish_time` int(10) NOT NULL DEFAULT '0' COMMENT '订单完成时间',
  `c_1_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_2_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_3_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_t_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_2t_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_1h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_2h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_3h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_4h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_id` (`order_id`),
  UNIQUE KEY `order_id_2` (`order_id`),
  UNIQUE KEY `order_id_3` (`order_id`),
  UNIQUE KEY `order_id_4` (`order_id`),
  UNIQUE KEY `order_id_5` (`order_id`),
  UNIQUE KEY `order_id_6` (`order_id`),
  UNIQUE KEY `order_id_7` (`order_id`),
  UNIQUE KEY `order_id_8` (`order_id`),
  UNIQUE KEY `order_id_9` (`order_id`),
  UNIQUE KEY `order_id_10` (`order_id`),
  KEY `uniacid` (`uniacid`),
  KEY `c_1_uid` (`c_1_uid`),
  KEY `c_2_uid` (`c_2_uid`),
  KEY `c_3_uid` (`c_3_uid`),
  KEY `c_t_uid` (`c_t_uid`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_order_u` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) NOT NULL DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `pingtai` varchar(20) NOT NULL COMMENT '平台',
  `pingtai_name` varchar(20) NOT NULL COMMENT '平台名',
  `order_type` varchar(20) NOT NULL COMMENT '订单类型',
  `order_status` int(3) NOT NULL DEFAULT '0' COMMENT '订单状态',
  `order_id` varchar(50) NOT NULL COMMENT '子订单号',
  `order_id_fa` varchar(50) NOT NULL COMMENT '主订单号',
  `goods_id` varchar(50) NOT NULL COMMENT '商品id',
  `order_create_time` varchar(10) NOT NULL COMMENT '订单创建时间',
  `order_paid_time` varchar(10) NOT NULL COMMENT '订单付款时间',
  `billingDate` varchar(10) NOT NULL COMMENT '分销联盟账期时间',
  `tk_earning_time` varchar(10) NOT NULL COMMENT '淘宝订单结算时间',
  `order_settlement_time` varchar(10) NOT NULL COMMENT '订单结算时间',
  `shopname` varchar(30) NOT NULL COMMENT '店铺名',
  `goods_title` varchar(255) NOT NULL,
  `goods_img` varchar(255) NOT NULL COMMENT '商品图片',
  `order_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单金额',
  `order_profit` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单佣金',
  `sid` varchar(20) NOT NULL COMMENT '订单侠渠道标识',
  `adzone_id` varchar(20) NOT NULL COMMENT 'pid=mm_1_2_3中的“3”这段数字',
  `site_id` varchar(20) NOT NULL COMMENT 'pid=mm_1_2_3中的“2”这段数字',
  `relation_id` varchar(20) NOT NULL COMMENT '渠道id',
  `alimama_rate` varchar(20) NOT NULL COMMENT '阿里妈妈技术服务费比例',
  `income_rate` varchar(20) NOT NULL COMMENT '佣金比例',
  `c_1` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '自买佣金',
  `c_1_uid` int(11) NOT NULL DEFAULT '0' COMMENT '自买UID',
  `c_1_unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `c_2` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '一级佣金',
  `c_2_uid` int(11) NOT NULL DEFAULT '0' COMMENT '一级UID',
  `c_2_unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `c_3` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '二级佣金',
  `c_3_uid` int(11) NOT NULL DEFAULT '0' COMMENT '二级UID',
  `c_3_unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `c_t` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_t_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c_t_unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `c_2t` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_2t_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c_1h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_1h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c_2h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_2h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c_3h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_3h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c_4h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_4h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c_h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金',
  `c_h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID',
  `c1_uid` int(11) NOT NULL DEFAULT '0' COMMENT '自买UID',
  `new` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `is_notice` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否通知',
  `order_finish_time` int(10) NOT NULL DEFAULT '0' COMMENT '订单完成时间',
  `c_1_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_2_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_3_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_t_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_2t_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_1h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_2h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_3h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  `c_4h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分',
  PRIMARY KEY (`id`),
  UNIQUE KEY `order_id` (`order_id`),
  UNIQUE KEY `order_id_2` (`order_id`),
  UNIQUE KEY `order_id_3` (`order_id`),
  UNIQUE KEY `order_id_4` (`order_id`),
  UNIQUE KEY `order_id_5` (`order_id`),
  UNIQUE KEY `order_id_6` (`order_id`),
  UNIQUE KEY `order_id_7` (`order_id`),
  UNIQUE KEY `order_id_8` (`order_id`),
  UNIQUE KEY `order_id_9` (`order_id`),
  UNIQUE KEY `order_id_10` (`order_id`),
  KEY `uniacid` (`uniacid`),
  KEY `c_1_uid` (`c_1_uid`),
  KEY `c_2_uid` (`c_2_uid`),
  KEY `c_3_uid` (`c_3_uid`),
  KEY `c_t_uid` (`c_t_uid`)
) ENGINE=MyISAM AUTO_INCREMENT=79 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_page` (
  `page_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `title` varchar(128) NOT NULL COMMENT '标题',
  `thumb` varchar(256) DEFAULT NULL COMMENT '封面图',
  `avatar` varchar(256) DEFAULT NULL COMMENT '作者头像',
  `name` varchar(50) DEFAULT NULL COMMENT '作者昵称',
  `desc` varchar(256) DEFAULT NULL COMMENT '分享描述',
  `content` text COMMENT '文章内容',
  `click` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '浏览次数',
  `create_time` int(11) unsigned NOT NULL COMMENT '发布时间',
  `post_time` int(11) unsigned NOT NULL COMMENT '发布时间',
  `displayorder` int(11) NOT NULL DEFAULT '0',
  `is_show` int(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`page_id`),
  KEY `uniacid` (`uniacid`),
  KEY `system_id` (`system_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_pid` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `pid` varchar(50) DEFAULT NULL,
  `sid` varchar(11) NOT NULL,
  `rid` varchar(11) NOT NULL,
  `pidname` varchar(50) NOT NULL,
  `medianame` varchar(50) NOT NULL,
  `nickname` varchar(50) NOT NULL,
  `openid` varchar(50) NOT NULL,
  `unionid` varchar(50) NOT NULL,
  `uid` int(10) NOT NULL DEFAULT '0',
  `is_use` int(2) NOT NULL DEFAULT '0',
  `use_time` int(11) NOT NULL DEFAULT '0',
  `update_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=52 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_pid_u` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `pid` varchar(50) DEFAULT NULL,
  `sid` varchar(11) NOT NULL,
  `rid` varchar(11) NOT NULL,
  `pidname` varchar(50) NOT NULL,
  `medianame` varchar(50) NOT NULL,
  `nickname` varchar(50) NOT NULL,
  `openid` varchar(50) NOT NULL,
  `unionid` varchar(50) NOT NULL,
  `uid` int(10) NOT NULL DEFAULT '0',
  `is_use` int(2) NOT NULL DEFAULT '0',
  `use_time` int(11) NOT NULL DEFAULT '0',
  `update_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=199 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_pidlog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `pid` varchar(50) DEFAULT NULL,
  `sid` varchar(11) NOT NULL,
  `rid` varchar(11) NOT NULL,
  `pidname` varchar(50) NOT NULL,
  `medianame` varchar(50) NOT NULL,
  `nickname` varchar(50) NOT NULL,
  `openid` varchar(50) NOT NULL,
  `unionid` varchar(50) NOT NULL,
  `uid` int(10) NOT NULL DEFAULT '0',
  `is_use` int(2) NOT NULL DEFAULT '0',
  `use_time` int(11) NOT NULL DEFAULT '0',
  `update_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1021 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_gzh_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `uid` varchar(255) DEFAULT '' COMMENT '我的uid',
  `posterid` int(11) DEFAULT '0' COMMENT '海报id',
  `from_uid` varchar(255) DEFAULT '' COMMENT '邀请人uid',
  `subcredit` int(11) DEFAULT '0' COMMENT '关注者积分',
  `reccredit` int(11) DEFAULT '0' COMMENT '推荐人积分',
  `createtime` int(11) DEFAULT '0',
  `recmoney` decimal(10,2) DEFAULT '0.00' COMMENT '推荐人余额',
  `submoney` decimal(10,2) DEFAULT '0.00' COMMENT '关注者余额',
  `isunsub` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否取消关注',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_gzh_member` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL,
  `uid` int(10) NOT NULL,
  `openid` varchar(100) NOT NULL DEFAULT '',
  `createtime` int(10) NOT NULL,
  `scancodenum` int(10) NOT NULL DEFAULT '0' COMMENT '总扫码次数',
  `randomnum` int(10) NOT NULL DEFAULT '0' COMMENT '总随机触发数',
  `level` tinyint(1) NOT NULL DEFAULT '0' COMMENT '等级 0本身 1级  2级 3级',
  `level1_uid` int(10) NOT NULL DEFAULT '0' COMMENT '等级1会员id',
  `level2_uid` int(10) NOT NULL DEFAULT '0' COMMENT '等级2会员id',
  `level3_uid` int(10) NOT NULL DEFAULT '0' COMMENT '等级3会员id',
  `nickname` varbinary(100) NOT NULL DEFAULT '' COMMENT '会员昵称',
  `parentid` int(11) NOT NULL DEFAULT '0' COMMENT '父级id',
  `level_num` int(11) NOT NULL DEFAULT '0' COMMENT '无限极 0 初级  大于0 级数',
  `misterid` int(11) NOT NULL DEFAULT '0' COMMENT '源头',
  `isceshi` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否测试数据',
  `ranking` int(11) NOT NULL DEFAULT '0' COMMENT '排名',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_gzh_poster` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `type` tinyint(3) DEFAULT '0' COMMENT '0关注海报',
  `title` varchar(255) DEFAULT '' COMMENT '标题',
  `bg` varchar(255) DEFAULT '' COMMENT '背景',
  `data` text COMMENT '位置数据',
  `keyword` varchar(255) DEFAULT '' COMMENT '触发关键词',
  `times` int(11) DEFAULT '0',
  `follows` int(11) DEFAULT '0',
  `isdefault` tinyint(3) DEFAULT '0' COMMENT '是否默认 1是 0否',
  `resptitle` varchar(255) DEFAULT '' COMMENT '推送标题',
  `respthumb` varchar(255) DEFAULT '' COMMENT '推送图片',
  `createtime` int(11) DEFAULT '0' COMMENT '推送时间',
  `respdesc` varchar(255) DEFAULT '' COMMENT '推送内容',
  `respurl` varchar(255) DEFAULT '' COMMENT '推送url',
  `waittext` varchar(255) DEFAULT '' COMMENT '等待提示',
  `oktext` varchar(255) DEFAULT '' COMMENT '制作成功提示',
  `subcredit` int(11) DEFAULT '0' COMMENT '关注者获得积分',
  `submoney` decimal(10,2) DEFAULT '0.00' COMMENT '关注者获得金额',
  `reccredit` int(11) DEFAULT '0' COMMENT '推荐人获得积分',
  `recmoney` decimal(10,2) DEFAULT '0.00' COMMENT '推荐人获得金额',
  `paytype` tinyint(1) DEFAULT '0' COMMENT '奖励现金方式 0余额 1微信钱包',
  `scantext` varchar(255) DEFAULT '' COMMENT '推荐者通知',
  `subtext` varchar(255) DEFAULT '' COMMENT '关注者通知',
  `beagent` tinyint(3) DEFAULT '0',
  `bedown` tinyint(3) DEFAULT '0',
  `isopen` tinyint(3) DEFAULT '0' COMMENT '是否开启',
  `opentext` varchar(255) DEFAULT '' COMMENT '未开放时候的提示',
  `openurl` varchar(255) DEFAULT '' COMMENT '未开放时候的说明连接',
  `templateid` varchar(255) DEFAULT '' COMMENT '通知模板消息ID（任务处理通知）',
  `subpaycontent` text COMMENT '您通过 [nickname]的推广二维码扫码关注的奖励',
  `recpaycontent` text COMMENT '推荐 [nickname] 扫码关注的奖励',
  `entrytext` varchar(255) DEFAULT '',
  `reccouponid` int(11) DEFAULT '0' COMMENT '推送者送优惠券ID',
  `reccouponnum` int(11) DEFAULT '0' COMMENT '推送者送优惠券数量',
  `subcouponid` int(11) DEFAULT '0' COMMENT '关注者送优惠券ID',
  `subcouponnum` int(11) DEFAULT '0' COMMENT '关注者送优惠券数量',
  `random` int(10) NOT NULL DEFAULT '0' COMMENT '随机次数  n次之后重0开始 触发一次',
  `sendtype` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'n次后触发发送类型 0链接 1二维码 2图文',
  `sendval` varchar(255) NOT NULL DEFAULT '' COMMENT '推送者链接文字',
  `sendurl` varchar(255) NOT NULL DEFAULT '' COMMENT '推送者链接',
  `followval` varchar(255) NOT NULL DEFAULT '' COMMENT '关注着链接文字',
  `followurl` varchar(255) NOT NULL DEFAULT '' COMMENT '关注者链接',
  `sendcode` varchar(255) NOT NULL DEFAULT '' COMMENT '推送者二维码',
  `followcode` varchar(255) NOT NULL DEFAULT '' COMMENT '关注者二维码',
  `rec_credit_random` int(10) NOT NULL DEFAULT '0' COMMENT '随机数到达后赠送推送者积分',
  `rec_money_random` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '随机数到达后赠送推送者金额',
  `relaystart` int(11) NOT NULL DEFAULT '0' COMMENT '接力起始值',
  `pcate` int(10) NOT NULL DEFAULT '0',
  `ccate` int(10) NOT NULL DEFAULT '0',
  `level1_credit` int(10) NOT NULL DEFAULT '0' COMMENT '一级获取积分',
  `level2_credit` int(10) NOT NULL DEFAULT '0',
  `level3_credit` int(10) NOT NULL DEFAULT '0',
  `level1_money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `level2_money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `level3_money` decimal(10,2) NOT NULL DEFAULT '0.00',
  `level0_val` varchar(255) NOT NULL DEFAULT '' COMMENT '分销统一提醒文字',
  `level0_url` varbinary(255) NOT NULL DEFAULT '' COMMENT '分销统一提醒文字链接',
  `level_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 一级 2二级 3三级',
  `coverimg` varchar(255) NOT NULL DEFAULT '' COMMENT '封面图片',
  `isopen_level` tinyint(3) DEFAULT '0' COMMENT '是否开启三级营销',
  `limitrandom` int(10) NOT NULL DEFAULT '0',
  `isclock` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启打卡 0否 1是',
  `clock_start_time` varchar(10) NOT NULL DEFAULT '' COMMENT '打开开始时间',
  `clock_end_time` varchar(10) NOT NULL DEFAULT '' COMMENT '打开结束时间',
  `clock_msg` varbinary(1000) NOT NULL DEFAULT '' COMMENT '打卡成功提醒',
  `clock_err` varbinary(1000) NOT NULL DEFAULT '' COMMENT '错过打卡时间提醒',
  `clock_send_credit` int(10) NOT NULL DEFAULT '0' COMMENT '打卡赠送积分',
  `clock_send_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '打卡赠送余额',
  `reckeyword` varchar(20) NOT NULL DEFAULT '' COMMENT '完成邀请关键词',
  `minetext` varchar(255) NOT NULL DEFAULT '' COMMENT '自扫了通知',
  `next_active_text` varchar(255) NOT NULL DEFAULT '' COMMENT '下一轮提示语',
  `scan_random_text` varchar(255) NOT NULL DEFAULT '' COMMENT '随机任务完成通知',
  `subresptype` tinyint(1) NOT NULL DEFAULT '0' COMMENT '关注者回复类型0图文2关键字',
  `subresp_keyword` varchar(255) NOT NULL DEFAULT '' COMMENT '关注着回复触发关键字',
  `isopenauto` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启自动生成海报',
  `subaudio_url` varchar(255) NOT NULL DEFAULT '' COMMENT '推送关注者音频链接',
  `sub_sendval` varchar(255) NOT NULL DEFAULT '',
  `sub_sendurl` varchar(255) NOT NULL DEFAULT '',
  `isunsubscribe` tinyint(1) NOT NULL DEFAULT '0' COMMENT '取消关注事件是否开启',
  `unsub_sendval` varchar(255) NOT NULL DEFAULT '' COMMENT '取消关注推送给上级内容',
  `israndomimg` tinyint(1) NOT NULL DEFAULT '0' COMMENT '图片是否随机抽取0否1是',
  `randomimgs` text COMMENT '随机图片抽取地址序列化',
  `ischeckpwd` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启密码验证',
  `password` varchar(255) NOT NULL DEFAULT '' COMMENT '海报校验密码',
  `pwdfail` varchar(255) NOT NULL DEFAULT '' COMMENT '错误提示',
  `pwdinfo` varchar(255) NOT NULL DEFAULT '' COMMENT '输入密码提示：例如请输入密码',
  `is_parent_info` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启获取一级用户信息',
  `parent_info` varchar(255) NOT NULL DEFAULT '' COMMENT '获取一级用户信息通知',
  `send_poster` text COMMENT '返回推荐者海报信息数据',
  `groupid` varchar(150) NOT NULL DEFAULT '' COMMENT '粉丝自动打标签',
  `is_groupid` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启自动分组',
  `reckeyword_prefix` varchar(10) NOT NULL DEFAULT '' COMMENT '邀请码前缀',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_plugin_gzh_qr` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL DEFAULT '0',
  `uid` int(10) NOT NULL DEFAULT '0',
  `type` tinyint(3) NOT NULL DEFAULT '0',
  `sceneid` int(11) NOT NULL DEFAULT '0',
  `mediaid` varchar(255) NOT NULL DEFAULT '',
  `ticket` varchar(250) NOT NULL DEFAULT '',
  `url` varchar(80) NOT NULL DEFAULT '',
  `createtime` int(10) NOT NULL DEFAULT '0',
  `qrimg` varchar(1000) NOT NULL DEFAULT '',
  `scenestr` varchar(255) NOT NULL DEFAULT '',
  `posterid` int(10) NOT NULL DEFAULT '0' COMMENT '海报id',
  `openid` varchar(100) NOT NULL DEFAULT '',
  `file` varchar(255) NOT NULL DEFAULT '',
  `nums` int(10) NOT NULL DEFAULT '0' COMMENT '扫码总次数',
  `finish_random_nums` int(10) NOT NULL DEFAULT '0' COMMENT '当前海报统计邀请任务完成次数',
  `randomnum` int(10) NOT NULL DEFAULT '0' COMMENT '随机记录数',
  `updateday` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间当前',
  `updatetime` varchar(20) NOT NULL DEFAULT '' COMMENT '更新时间 时分',
  `updatenum` int(10) NOT NULL DEFAULT '0' COMMENT '每天更新一次累加',
  `clock_num` int(10) NOT NULL DEFAULT '0' COMMENT '打卡统计累加',
  `reccode` varchar(10) NOT NULL DEFAULT '' COMMENT '推荐码',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_poster` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `cateid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '海报类型',
  `type` tinyint(3) DEFAULT '0' COMMENT '0小程序码，1公众号码',
  `title` varchar(255) DEFAULT '' COMMENT '标题',
  `bg` varchar(255) DEFAULT '' COMMENT '背景',
  `data` text COMMENT '位置数据',
  `isopen` tinyint(3) DEFAULT '0' COMMENT '是否开启',
  `createtime` int(11) DEFAULT '0' COMMENT '时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_postercate` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `shop_id` int(11) DEFAULT '0',
  `catename` varchar(50) DEFAULT NULL,
  `thumb` varchar(255) DEFAULT '',
  `displayorder` int(11) DEFAULT '0',
  `enabled` int(11) DEFAULT '0',
  `cattype` tinyint(1) NOT NULL,
  `erji` text NOT NULL,
  `fid` int(11) NOT NULL,
  `pingon` tinyint(1) NOT NULL,
  `editpingon` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_qr` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `uid` int(10) NOT NULL DEFAULT '0',
  `openid` varchar(64) NOT NULL COMMENT 'openid',
  `unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `type` tinyint(3) NOT NULL DEFAULT '0',
  `sceneid` int(11) NOT NULL DEFAULT '0',
  `mediaid` varchar(255) NOT NULL DEFAULT '',
  `ticket` varchar(250) NOT NULL DEFAULT '',
  `url` varchar(80) NOT NULL DEFAULT '',
  `createtime` int(10) NOT NULL DEFAULT '0',
  `qrimg` varchar(1000) NOT NULL DEFAULT '',
  `scenestr` varchar(255) NOT NULL DEFAULT '',
  `posterid` int(10) NOT NULL DEFAULT '0' COMMENT '海报id',
  `file` varchar(255) NOT NULL DEFAULT '',
  `mall_type` varchar(20) NOT NULL,
  `goods_id` varchar(50) NOT NULL,
  `goods_title` varchar(200) NOT NULL,
  `goods_desc` varchar(100) NOT NULL,
  `goods_photo` varchar(255) NOT NULL,
  `xcxuniacid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_scene` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) NOT NULL DEFAULT '0',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `uid` int(10) NOT NULL DEFAULT '0',
  `openid` varchar(64) NOT NULL COMMENT 'openid',
  `unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `scenestr` varchar(32) NOT NULL DEFAULT '',
  `scenedata` varchar(500) NOT NULL DEFAULT '',
  `createtime` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `scenestr` (`scenestr`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_subscribemessage` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `adid` int(11) unsigned NOT NULL DEFAULT '0',
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `openid` varchar(64) NOT NULL COMMENT '用户OPENID',
  `unionid` varchar(64) NOT NULL COMMENT '用户unionid',
  `s_1_num` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '提醒剩余次数',
  `warm_daytime` int(11) unsigned NOT NULL COMMENT '提醒订阅时间',
  `warm_daynum` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '提醒当天次数',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`),
  KEY `system_id` (`system_id`),
  KEY `adid` (`adid`),
  KEY `openid` (`openid`),
  KEY `unionid` (`unionid`)
) ENGINE=MyISAM AUTO_INCREMENT=73 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_systemlog` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `api_appKey` varchar(20) NOT NULL COMMENT 'api_appKey',
  `apiname` varchar(64) NOT NULL COMMENT 'apiname',
  `log` mediumtext COMMENT '接口log',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=163 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_task` (
  `task_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `user_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '任务会员类型，0普通用户任务，1团长任务，2合伙人任务',
  `task_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '任务类型，0普通任务，1新人任务，2老带新',
  `new_task_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '任务类型，0自购出单',
  `new_task_day` int(11) unsigned NOT NULL COMMENT '有效天数',
  `new_task_order_money` int(11) unsigned NOT NULL COMMENT '自购出单订单最低金额',
  `new_task_up_money` varchar(256) DEFAULT '0' COMMENT '自购出单奖励金额',
  `new_task_up_credit` varchar(256) DEFAULT '0' COMMENT '自购出单奖励积分',
  `new_task_up_money_fa` varchar(256) DEFAULT '0' COMMENT '自购出单直推上级奖励金额',
  `new_task_up_credit_fa` varchar(256) DEFAULT '0' COMMENT '自购出单直推上级奖励积分',
  `name` varchar(32) DEFAULT NULL COMMENT '任务名称',
  `start_time` int(11) unsigned NOT NULL COMMENT '任务开始时间',
  `end_time` int(11) unsigned NOT NULL COMMENT '任务结束时间',
  `invite_sum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推人数',
  `invite_allsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推人数',
  `invite_yxsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效直推人数',
  `invite_yxallsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效间推人数',
  `invite_tuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推团长数量',
  `invite_alltuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推团长数量',
  `invite_he` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推合伙人数量',
  `invite_allhe` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推合伙人数量',
  `order_sum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自购订单数量',
  `invite_order` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推订单数量',
  `invite_allorder` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推订单数量',
  `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '自购佣金',
  `invite_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '直推佣金',
  `invite_allmoney` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '间推佣金',
  `allmoney` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '总佣金',
  `up_type` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '完成任务奖励类型：0不升级，1升级团长，2升级合伙人',
  `up_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '奖励金额',
  `up_credit` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '奖励积分',
  `is_retask` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否重复任务',
  `re_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '重复次数',
  `status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '任务状态，1进行中，0未开始/已结束',
  `lq_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '任务领取类型',
  `is_lq` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否领取',
  `item_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '积分奖品id',
  `page_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '任务说明文章id',
  `url` varchar(256) DEFAULT NULL COMMENT '任务说明url',
  `desc` varchar(100) DEFAULT NULL COMMENT '奖励说明',
  `bglineColor` varchar(10) DEFAULT NULL COMMENT '滑块背景线条颜色',
  `bglineAColor` varchar(10) DEFAULT NULL COMMENT '滑块背景线条激活颜色',
  `barBgColor_left` varchar(10) DEFAULT NULL COMMENT '滑块背景颜色-左',
  `barBgColor_right` varchar(10) DEFAULT NULL COMMENT '滑块背景颜色-右',
  `BgColor_wl` varchar(10) DEFAULT NULL COMMENT '未领取背景色',
  `BgColor_yl` varchar(10) DEFAULT NULL COMMENT '已领取背景色',
  `desc_color` varchar(10) DEFAULT NULL COMMENT '进度条下方奖励说明文字颜色',
  `jp_url` varchar(256) DEFAULT NULL COMMENT '奖品说明图标',
  `lq_url` varchar(256) DEFAULT NULL COMMENT '领取图标',
  `is_online` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否在前端显示',
  `displayorder` int(11) unsigned NOT NULL COMMENT '排序',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  `content` text COMMENT '说明内容',
  PRIMARY KEY (`task_id`),
  KEY `uniacid` (`uniacid`),
  KEY `system_id` (`system_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_task_temp` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `task_id` int(11) DEFAULT NULL COMMENT '抽奖ID',
  `user_id` int(11) NOT NULL COMMENT '用户ID',
  `openid` varchar(64) NOT NULL COMMENT 'openid',
  `unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `type` int(2) DEFAULT '0' COMMENT '1，现金 2，积分',
  `addtime` char(11) DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_user` (
  `user_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(11) unsigned NOT NULL DEFAULT '0',
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `openid` varchar(64) NOT NULL COMMENT '用户OPENID',
  `utmMedium` varchar(64) NOT NULL COMMENT 'utmMedium',
  `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐ID',
  `parent2_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '2级推荐ID',
  `parent_1tid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '1级团长ID',
  `parent_2tid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '2级团长ID',
  `parent_1hid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '1级合伙人ID',
  `parent_2hid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '2级合伙人ID',
  `parent_hid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父合伙人ID',
  `parent_unionid` varchar(64) NOT NULL COMMENT '推荐UNIONID',
  `is_tuan` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否团长',
  `tuan_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '团长类型',
  `nickname` varchar(32) DEFAULT NULL COMMENT '昵称',
  `avatar` varchar(256) DEFAULT NULL COMMENT '头像',
  `money_qrcode` varchar(256) DEFAULT NULL COMMENT '收款二维码',
  `wxno` varchar(50) DEFAULT NULL COMMENT '微信号',
  `alipayno` varchar(50) DEFAULT NULL COMMENT '支付宝号',
  `realname` varchar(50) DEFAULT NULL COMMENT '真实姓名',
  `mobile` varchar(20) NOT NULL COMMENT '手机号码',
  `moviemobile` varchar(20) NOT NULL COMMENT '手机号码',
  `credit` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '积分',
  `order_num` int(6) unsigned NOT NULL DEFAULT '0' COMMENT '订单数量',
  `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '红包账户',
  `allmoney` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '红包账户',
  `unionid` varchar(64) DEFAULT NULL COMMENT '用户unionid',
  `invite_uid` varchar(256) NOT NULL,
  `invite_unionid` varchar(1000) NOT NULL,
  `invite_sum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_allsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_yxsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_yxallsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_tuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_alltuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_he` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_allhe` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `new` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `movie_ticketer` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '电影票票商',
  `movie_tpl_num` int(3) unsigned NOT NULL DEFAULT '0' COMMENT '电影票提醒次数',
  `new_tuan` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `yx` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `relation_id` varchar(11) DEFAULT NULL COMMENT '用户渠道ID',
  `s_1_num` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '点餐提醒次数',
  `sign_tpl_num` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '签到提醒次数',
  `warm_daytime` int(11) unsigned NOT NULL COMMENT '点餐提醒订阅时间',
  `warm_daynum` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '点餐提醒当天次数',
  `foodlist` varchar(256) DEFAULT NULL COMMENT '菜单',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  `uptuan_time` int(11) unsigned NOT NULL COMMENT '升级团长时间',
  `sign_in` int(11) unsigned NOT NULL COMMENT '签到时间',
  `sign_in_continuity` int(10) DEFAULT '0' COMMENT '连续签到天数',
  `sign_in_sum` int(11) DEFAULT '0' COMMENT '总签到数',
  `task_address` int(11) DEFAULT '2' COMMENT '1，完成 2，未完成',
  `task_taobao` int(11) DEFAULT '2' COMMENT '1，完成 2，未完成',
  `task_weixin` int(11) DEFAULT '2' COMMENT '1，完成 2，未完成',
  `movieshow` mediumtext COMMENT '电影场次',
  `is_black` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否黑名单',
  `pdd_auth` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '拼多多是否授权',
  PRIMARY KEY (`user_id`),
  KEY `uniacid` (`uniacid`),
  KEY `openid` (`openid`)
) ENGINE=MyISAM AUTO_INCREMENT=81 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_user_creditlogs` (
  `log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(11) NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `user_id` int(11) NOT NULL COMMENT '用户ID',
  `openid` varchar(64) NOT NULL COMMENT 'openid',
  `unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `num` int(11) NOT NULL DEFAULT '0' COMMENT '变动数量',
  `last_num` int(11) NOT NULL DEFAULT '0' COMMENT '上次余额',
  `reason` varchar(32) DEFAULT NULL COMMENT '变动事由',
  `order_id` varchar(50) NOT NULL COMMENT '订单号',
  `type` int(2) NOT NULL COMMENT 'c_1_2_3_t',
  `create_time` int(11) unsigned NOT NULL COMMENT '变动时间',
  PRIMARY KEY (`log_id`)
) ENGINE=MyISAM AUTO_INCREMENT=54 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_user_logs` (
  `log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(11) NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `user_id` int(11) NOT NULL COMMENT '用户ID',
  `openid` varchar(64) NOT NULL COMMENT 'openid',
  `unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `num` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变动金额',
  `last_num` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '上次金额',
  `reason` varchar(32) DEFAULT NULL COMMENT '变动事由',
  `order_id` varchar(50) NOT NULL COMMENT '订单号',
  `type` int(2) NOT NULL COMMENT 'c_1_2_3_t',
  `cash_id` int(11) NOT NULL COMMENT '提现ID',
  `create_time` int(11) unsigned NOT NULL COMMENT '变动时间',
  PRIMARY KEY (`log_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_user_logs_u` (
  `log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(11) NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `user_id` int(11) NOT NULL COMMENT '用户ID',
  `openid` varchar(64) NOT NULL COMMENT 'openid',
  `unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `num` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变动金额',
  `last_num` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '上次金额',
  `reason` varchar(32) DEFAULT NULL COMMENT '变动事由',
  `order_id` varchar(50) NOT NULL COMMENT '订单号',
  `cash_id` int(11) NOT NULL COMMENT '提现ID',
  `type` int(2) NOT NULL COMMENT 'c_1_2_3_t',
  `create_time` int(11) unsigned NOT NULL COMMENT '变动时间',
  PRIMARY KEY (`log_id`)
) ENGINE=MyISAM AUTO_INCREMENT=51 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_user_task` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `task_id` int(11) unsigned NOT NULL COMMENT '任务ID',
  `user_id` int(11) unsigned NOT NULL COMMENT '用户ID',
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `unionid` varchar(64) DEFAULT NULL COMMENT '用户unionid',
  `user_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '会员类型，1普通用户任务，2团长任务，3合伙人任务',
  `invite_sum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推人数',
  `invite_allsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推人数',
  `invite_yxsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效直推人数',
  `invite_yxallsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效间推人数',
  `invite_tuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推团长数量',
  `invite_alltuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推团长数量',
  `invite_he` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推合伙人数量',
  `invite_allhe` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推合伙人数量',
  `order_sum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自购订单数量',
  `invite_order` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推订单数量',
  `invite_allorder` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推订单数量',
  `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '自购佣金',
  `invite_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '直推佣金',
  `invite_allmoney` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '间推佣金',
  `allmoney` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '总佣金',
  `uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '被邀请人用户id',
  `status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '任务状态，1已完成，0进行中',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `task_id` (`task_id`),
  KEY `uniacid` (`uniacid`),
  KEY `system_id` (`system_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_user_u` (
  `user_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(11) unsigned NOT NULL DEFAULT '0',
  `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `openid` varchar(64) NOT NULL COMMENT '用户OPENID',
  `utmMedium` varchar(64) NOT NULL COMMENT 'utmMedium',
  `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐ID',
  `parent2_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '2级推荐ID',
  `parent_1tid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '1级团长ID',
  `parent_2tid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '2级团长ID',
  `parent_1hid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '1级合伙人ID',
  `parent_2hid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '2级合伙人ID',
  `parent_hid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父合伙人ID',
  `parent_unionid` varchar(64) NOT NULL COMMENT '推荐UNIONID',
  `is_tuan` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否团长',
  `tuan_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '团长类型',
  `nickname` varchar(32) DEFAULT NULL COMMENT '昵称',
  `avatar` varchar(256) DEFAULT NULL COMMENT '头像',
  `money_qrcode` varchar(256) DEFAULT NULL COMMENT '收款二维码',
  `wxno` varchar(50) DEFAULT NULL COMMENT '微信号',
  `alipayno` varchar(50) DEFAULT NULL COMMENT '支付宝号',
  `realname` varchar(50) DEFAULT NULL COMMENT '真实姓名',
  `mobile` varchar(20) NOT NULL COMMENT '手机号码',
  `moviemobile` varchar(20) NOT NULL COMMENT '手机号码',
  `order_num` int(6) unsigned NOT NULL DEFAULT '0' COMMENT '订单数量',
  `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '红包账户',
  `credit` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '积分',
  `allmoney` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '红包账户',
  `unionid` varchar(64) NOT NULL COMMENT '用户unionid',
  `invite_uid` varchar(256) NOT NULL,
  `invite_unionid` varchar(1000) NOT NULL,
  `invite_sum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_allsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_yxsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_yxallsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_tuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_alltuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_he` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `invite_allhe` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `new` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `movie_ticketer` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '电影票票商',
  `movie_tpl_num` int(3) unsigned NOT NULL DEFAULT '0' COMMENT '电影票提醒次数',
  `new_tuan` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `yx` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量',
  `s_1_num` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '点餐提醒次数',
  `sign_tpl_num` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '签到提醒次数',
  `warm_daytime` int(11) unsigned NOT NULL COMMENT '点餐提醒订阅时间',
  `warm_daynum` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '点餐提醒当天次数',
  `relation_id` varchar(11) DEFAULT NULL COMMENT '用户渠道ID',
  `foodlist` varchar(256) DEFAULT NULL COMMENT '菜单',
  `create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
  `uptuan_time` int(11) unsigned NOT NULL COMMENT '升级团长时间',
  `sign_in` int(11) unsigned NOT NULL COMMENT '签到时间',
  `sign_in_continuity` int(10) DEFAULT '0' COMMENT '连续签到天数',
  `sign_in_sum` int(11) DEFAULT '0' COMMENT '总签到数',
  `task_address` int(11) DEFAULT '2' COMMENT '1，完成 2，未完成',
  `task_taobao` int(11) DEFAULT '2' COMMENT '1，完成 2，未完成',
  `task_weixin` int(11) DEFAULT '2' COMMENT '1，完成 2，未完成',
  `movieshow` mediumtext COMMENT '电影场次',
  `is_black` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否黑名单',
  `pdd_auth` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '拼多多是否授权',
  PRIMARY KEY (`user_id`),
  KEY `uniacid` (`uniacid`),
  KEY `openid` (`openid`),
  KEY `unionid` (`unionid`),
  KEY `unionid_2` (`unionid`),
  KEY `unionid_3` (`unionid`),
  KEY `unionid_4` (`unionid`),
  KEY `unionid_5` (`unionid`),
  KEY `unionid_6` (`unionid`),
  KEY `unionid_7` (`unionid`),
  KEY `unionid_8` (`unionid`),
  KEY `unionid_9` (`unionid`),
  KEY `unionid_10` (`unionid`)
) ENGINE=MyISAM AUTO_INCREMENT=62 DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `ims_asterye_waimaixia_user_uplogs` (
  `log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `uniacid` int(11) NOT NULL COMMENT '平台ID',
  `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID',
  `user_id` int(11) NOT NULL COMMENT '用户ID',
  `openid` varchar(64) NOT NULL COMMENT 'openid',
  `unionid` varchar(64) NOT NULL COMMENT 'UNIONID',
  `is_tuan` int(2) NOT NULL DEFAULT '0' COMMENT '变动等级',
  `reason` varchar(32) DEFAULT NULL COMMENT '变动事由',
  `create_time` int(11) unsigned NOT NULL COMMENT '变动时间',
  PRIMARY KEY (`log_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

";
pdo_run($sql);
if(!pdo_fieldexists("asterye_waimaixia_ad", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "bgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `bgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `title` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "title_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `title_text` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "title_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `title_desc` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `cateid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "adtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `adtype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "is_ios")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `is_ios` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "elmwm_act_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `elmwm_act_id` varchar(32) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "mtpic")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `mtpic` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "appid_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "appid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `appid` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "path")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `path` varchar(2000) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `url` varchar(2000) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "reply_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `reply_thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "reply_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `reply_text` varchar(500);");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "is_show")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `is_show` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "link_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `link_title` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "link_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `link_desc` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "link_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `link_thumb` varchar(256) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "link_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `link_url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "waimaitt_list_bgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `waimaitt_list_bgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "waimaitt_list_leftupicon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `waimaitt_list_leftupicon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "waimaitt_list_leftdownicon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `waimaitt_list_leftdownicon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "waimaitt_list_jine")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `waimaitt_list_jine` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "waimaitt_list_jineunit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `waimaitt_list_jineunit` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "waimaitt_list_jinerighttext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `waimaitt_list_jinerighttext` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "waimaitt_list_lingqutext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `waimaitt_list_lingqutext` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "waimaitt_list_lingqucolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `waimaitt_list_lingqucolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "waimaitt_list_lingqubgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `waimaitt_list_lingqubgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "width")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `width` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "height")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `height` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "tplid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `tplid` varchar(500) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "meituantype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `meituantype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "style")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `style` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "appid_type2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `appid_type2` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "cateid2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `cateid2` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "is_warm")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `is_warm` int(2) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "pic_style")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `pic_style` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "mall_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `mall_thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "mall_is_show")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `mall_is_show` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "mall_adtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `mall_adtype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "banner_color")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `banner_color` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "mall_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `mall_type` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "banner_color2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `banner_color2` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "huodong_banner")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `huodong_banner` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "huodong_banner_style")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `huodong_banner_style` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "open_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `open_thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "goods_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `goods_id` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "system_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `system_type` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "mall_index_all")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `mall_index_all` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad", "tplid_oneday_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad")." ADD `tplid_oneday_num` int(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "bgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `bgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `title` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "title_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `title_text` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "title_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `title_desc` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `cateid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "adtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `adtype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "is_ios")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `is_ios` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "elmwm_act_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `elmwm_act_id` varchar(32) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "mtpic")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `mtpic` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "appid_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "appid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `appid` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "path")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `path` varchar(2000) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `url` varchar(2000) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "reply_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `reply_thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "reply_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `reply_text` varchar(500);");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "is_show")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `is_show` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "link_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `link_title` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "link_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `link_desc` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "link_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `link_thumb` varchar(256) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "link_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `link_url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "waimaitt_list_bgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `waimaitt_list_bgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "waimaitt_list_leftupicon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `waimaitt_list_leftupicon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "waimaitt_list_leftdownicon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `waimaitt_list_leftdownicon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "waimaitt_list_jine")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `waimaitt_list_jine` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "waimaitt_list_jineunit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `waimaitt_list_jineunit` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "waimaitt_list_jinerighttext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `waimaitt_list_jinerighttext` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "waimaitt_list_lingqutext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `waimaitt_list_lingqutext` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "waimaitt_list_lingqucolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `waimaitt_list_lingqucolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "waimaitt_list_lingqubgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `waimaitt_list_lingqubgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "width")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `width` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "height")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `height` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "tplid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `tplid` varchar(500) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "meituantype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `meituantype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "style")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `style` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "appid_type2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `appid_type2` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "cateid2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `cateid2` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "is_warm")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `is_warm` int(2) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "pic_style")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `pic_style` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "mall_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `mall_thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "mall_is_show")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `mall_is_show` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "mall_adtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `mall_adtype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "banner_color")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `banner_color` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "mall_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `mall_type` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "huodong_banner")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `huodong_banner` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "banner_color2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `banner_color2` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "huodong_banner_style")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `huodong_banner_style` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "open_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `open_thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "goods_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `goods_id` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "system_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `system_type` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "mall_index_all")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `mall_index_all` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "tplid_oneday_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `tplid_oneday_num` int(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "bgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `bgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `title` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "title_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `title_text` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "title_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `title_desc` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `cateid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "adtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `adtype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "is_ios")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `is_ios` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "elmwm_act_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `elmwm_act_id` varchar(32) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "mtpic")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `mtpic` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "appid_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "appid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `appid` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "path")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `path` varchar(2000) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `url` varchar(2000) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "reply_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `reply_thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "reply_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `reply_text` varchar(500);");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "is_show")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `is_show` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "link_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `link_title` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "link_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `link_desc` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "link_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `link_thumb` varchar(256) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "link_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `link_url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "waimaitt_list_bgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `waimaitt_list_bgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "waimaitt_list_leftupicon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `waimaitt_list_leftupicon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "waimaitt_list_leftdownicon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `waimaitt_list_leftdownicon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "waimaitt_list_jine")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `waimaitt_list_jine` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "waimaitt_list_jineunit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `waimaitt_list_jineunit` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "waimaitt_list_jinerighttext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `waimaitt_list_jinerighttext` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "waimaitt_list_lingqutext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `waimaitt_list_lingqutext` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "waimaitt_list_lingqucolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `waimaitt_list_lingqucolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "waimaitt_list_lingqubgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `waimaitt_list_lingqubgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "width")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `width` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "height")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `height` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "tplid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `tplid` varchar(500) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "meituantype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `meituantype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "style")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `style` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "appid_type2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `appid_type2` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "cateid2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `cateid2` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "is_warm")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `is_warm` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "pic_style")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `pic_style` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "mall_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `mall_thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "mall_is_show")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `mall_is_show` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "mall_adtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `mall_adtype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "banner_color")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `banner_color` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "mall_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `mall_type` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "huodong_banner")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `huodong_banner` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "banner_color2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `banner_color2` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "huodong_banner_style")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `huodong_banner_style` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "open_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `open_thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "goods_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `goods_id` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "system_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `system_type` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "mall_index_all")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `mall_index_all` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "tplid_oneday_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `tplid_oneday_num` int(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_new_temp", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_new_temp")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "bgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `bgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `title` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "title_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `title_text` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "title_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `title_desc` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `cateid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "adtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `adtype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "is_ios")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `is_ios` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "elmwm_act_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `elmwm_act_id` varchar(32) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "appid_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `appid_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "appid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `appid` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "path")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `path` varchar(2000) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `url` varchar(2000) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "reply_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `reply_thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "reply_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `reply_text` varchar(500);");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "is_show")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `is_show` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "link_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `link_title` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "link_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `link_desc` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "link_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `link_thumb` varchar(256) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "link_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `link_url` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "waimaitt_list_bgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `waimaitt_list_bgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "waimaitt_list_leftupicon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `waimaitt_list_leftupicon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "waimaitt_list_leftdownicon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `waimaitt_list_leftdownicon` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "waimaitt_list_jine")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `waimaitt_list_jine` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "waimaitt_list_jineunit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `waimaitt_list_jineunit` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "waimaitt_list_jinerighttext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `waimaitt_list_jinerighttext` varchar(30) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "waimaitt_list_lingqutext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `waimaitt_list_lingqutext` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "waimaitt_list_lingqucolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `waimaitt_list_lingqucolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "waimaitt_list_lingqubgcolor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `waimaitt_list_lingqubgcolor` varchar(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "width")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `width` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "height")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `height` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "tplid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `tplid` varchar(500) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "meituantype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `meituantype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "style")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `style` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "appid_type2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `appid_type2` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '小程序类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "cateid2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `cateid2` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "is_warm")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `is_warm` int(2) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "pic_style")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `pic_style` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "mall_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `mall_thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "mall_is_show")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `mall_is_show` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "mall_adtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `mall_adtype` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "banner_color")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `banner_color` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "mall_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `mall_type` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "banner_color2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `banner_color2` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "huodong_banner")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `huodong_banner` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "huodong_banner_style")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `huodong_banner_style` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "open_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `open_thumb` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "goods_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `goods_id` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "system_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `system_type` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "mall_index_all")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `mall_index_all` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_ad_u", "tplid_oneday_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_ad_u")." ADD `tplid_oneday_num` int(4) NOT NULL DEFAULT '1';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "apisecret")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `apisecret` varchar(64) COMMENT 'apisecret';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT 'api类型，1为美团2为电影票';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "money_qrcode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `money_qrcode` varchar(256) COMMENT '收款二维码';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "wxno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `wxno` varchar(50) COMMENT '微信号';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "alipayno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `alipayno` varchar(50) COMMENT '支付宝号';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "realname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `realname` varchar(50) COMMENT '真实姓名';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "mobile")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `mobile` varchar(20) NOT NULL COMMENT '手机号码';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '账户余额';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "meituan_rate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `meituan_rate` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '美团结算比例';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "movie_rate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `movie_rate` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '电影票结算比例';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "meituan_apikey")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `meituan_apikey` varchar(64) COMMENT '美团官方api秘钥';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "meituan_appkey")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `meituan_appkey` varchar(64) COMMENT '美团官方媒体Appkey';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "meituan_name")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `meituan_name` varchar(64) COMMENT '美团官方渠道标识';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "movie_platformId")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `movie_platformId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '电影票平台id';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "movie_secret")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `movie_secret` varchar(64) COMMENT '电影票接口秘钥';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "movie_subplatformId")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `movie_subplatformId` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '电影票渠道id';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "status")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '状态';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_api", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api")." ADD `displayorder` int(11) unsigned NOT NULL COMMENT '排序';");
}
if(!pdo_fieldexists("asterye_waimaixia_api_cashlogs", "log_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api_cashlogs")." ADD `log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_api_cashlogs", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api_cashlogs")." ADD `uniacid` int(11) NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_api_cashlogs", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api_cashlogs")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_api_cashlogs", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api_cashlogs")." ADD `user_id` int(11) NOT NULL COMMENT '用户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_api_cashlogs", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api_cashlogs")." ADD `openid` varchar(64) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("asterye_waimaixia_api_cashlogs", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api_cashlogs")." ADD `unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_api_cashlogs", "num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api_cashlogs")." ADD `num` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变动金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_api_cashlogs", "reason")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api_cashlogs")." ADD `reason` varchar(32) COMMENT '变动事由';");
}
if(!pdo_fieldexists("asterye_waimaixia_api_cashlogs", "order_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api_cashlogs")." ADD `order_id` varchar(50) NOT NULL COMMENT '订单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_api_cashlogs", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api_cashlogs")." ADD `type` int(2) NOT NULL COMMENT 'c_1_2_3_t';");
}
if(!pdo_fieldexists("asterye_waimaixia_api_cashlogs", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_api_cashlogs")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '变动时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_apicash", "cash_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_apicash")." ADD `cash_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_apicash", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_apicash")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_apicash", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_apicash")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_apicash", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_apicash")." ADD `user_id` int(11) unsigned NOT NULL COMMENT '用户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_apicash", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_apicash")." ADD `openid` varchar(64) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("asterye_waimaixia_apicash", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_apicash")." ADD `unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_apicash", "alipayno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_apicash")." ADD `alipayno` varchar(50) COMMENT '支付宝号';");
}
if(!pdo_fieldexists("asterye_waimaixia_apicash", "realname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_apicash")." ADD `realname` varchar(50) COMMENT '真实姓名';");
}
if(!pdo_fieldexists("asterye_waimaixia_apicash", "num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_apicash")." ADD `num` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '提现额度';");
}
if(!pdo_fieldexists("asterye_waimaixia_apicash", "billno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_apicash")." ADD `billno` varchar(32) COMMENT '流水号';");
}
if(!pdo_fieldexists("asterye_waimaixia_apicash", "status")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_apicash")." ADD `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '支付状态';");
}
if(!pdo_fieldexists("asterye_waimaixia_apicash", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_apicash")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "cash_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `cash_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `user_id` int(11) unsigned NOT NULL COMMENT '用户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `openid` varchar(64) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "alipayno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `alipayno` varchar(50) COMMENT '支付宝号';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "realname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `realname` varchar(50) COMMENT '真实姓名';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "mobile")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `mobile` varchar(20) NOT NULL COMMENT '手机号码';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "money_qrcode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `money_qrcode` varchar(256) COMMENT '收款二维码';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "reason")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `reason` varchar(50) NOT NULL COMMENT '拒绝原因';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `num` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '提现额度';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "billno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `billno` varchar(32) COMMENT '流水号';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "status")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '支付状态';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "cash_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `cash_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `user_id` int(11) unsigned NOT NULL COMMENT '用户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `openid` varchar(64) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "alipayno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `alipayno` varchar(50) COMMENT '支付宝号';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "realname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `realname` varchar(50) COMMENT '真实姓名';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "mobile")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `mobile` varchar(20) NOT NULL COMMENT '手机号码';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "money_qrcode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `money_qrcode` varchar(256) COMMENT '收款二维码';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "reason")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `reason` varchar(50) NOT NULL COMMENT '拒绝原因';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `num` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '提现额度';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "billno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `billno` varchar(32) COMMENT '流水号';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "status")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '支付状态';");
}
if(!pdo_fieldexists("asterye_waimaixia_cash_u", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cash_u")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_cinema", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cinema")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_cinema", "cinemaId")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cinema")." ADD `cinemaId` int(10) unsigned NOT NULL COMMENT '电影院id';");
}
if(!pdo_fieldexists("asterye_waimaixia_cinema", "cityId")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cinema")." ADD `cityId` int(10) unsigned NOT NULL COMMENT '城市id';");
}
if(!pdo_fieldexists("asterye_waimaixia_cinema", "cinemaName")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cinema")." ADD `cinemaName` varchar(64) NOT NULL COMMENT '电影院名';");
}
if(!pdo_fieldexists("asterye_waimaixia_cinema", "address")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cinema")." ADD `address` varchar(256) NOT NULL COMMENT '厅名';");
}
if(!pdo_fieldexists("asterye_waimaixia_cinema", "latitude")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cinema")." ADD `latitude` double COMMENT 'lat';");
}
if(!pdo_fieldexists("asterye_waimaixia_cinema", "longitude")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cinema")." ADD `longitude` double COMMENT 'lon';");
}
if(!pdo_fieldexists("asterye_waimaixia_cinema", "phone")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cinema")." ADD `phone` varchar(20) NOT NULL COMMENT '影院电话';");
}
if(!pdo_fieldexists("asterye_waimaixia_cinema", "regionName")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cinema")." ADD `regionName` varchar(32) NOT NULL COMMENT '地区';");
}
if(!pdo_fieldexists("asterye_waimaixia_cinema", "shows")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cinema")." ADD `shows` mediumtext COMMENT '场次信息';");
}
if(!pdo_fieldexists("asterye_waimaixia_cinema", "update_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_cinema")." ADD `update_time` int(11) unsigned NOT NULL COMMENT '更新时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "item_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `item_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "shop_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `shop_id` int(11) unsigned NOT NULL COMMENT '商户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `title` varchar(256) NOT NULL COMMENT '商品标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `desc` varchar(512) COMMENT '描述';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "price")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `price` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '销售价格';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "market_price")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `market_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '划线价格';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "click")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `click` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '点击量';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "photos")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `photos` text COMMENT '商品图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "banner")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `banner` varchar(256) COMMENT '弹出横幅';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "details")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `details` text COMMENT '商品详情';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "details2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `details2` text COMMENT '商品详情';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "sold")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `sold` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '浏览次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "stock")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `stock` int(11) unsigned NOT NULL DEFAULT '99' COMMENT '商品库存';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "remark")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `remark` varchar(128) COMMENT '备注提示语';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "appid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `appid` varchar(64);");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "path")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `path` varchar(128);");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "is_del")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "is_audit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `is_audit` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否审核';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "is_sale")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `is_sale` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否上架';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "is_matter")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `is_matter` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否实物';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "sort")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `sort` smallint(4) unsigned NOT NULL DEFAULT '0' COMMENT '排序数字';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `cateid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "audit_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `audit_text` varchar(128) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "edit_openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `edit_openid` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_item", "chk_openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item")." ADD `chk_openid` varchar(64) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "order_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `order_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "orderid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `orderid` varchar(32) NOT NULL COMMENT '订单ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `openid` varchar(64) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "shop_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `shop_id` int(11) unsigned NOT NULL COMMENT '商户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "item_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `item_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预约商品';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `user_id` int(11) unsigned NOT NULL COMMENT '用户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `num` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '购买数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "price")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `price` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支付费用';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "market_price")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `market_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '划线价格';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "name")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `name` varchar(64) COMMENT '姓名';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "mobile")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `mobile` varchar(16) COMMENT '手机号码';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "address")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `address` varchar(80) COMMENT '地址';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "remark")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `remark` varchar(256) COMMENT '备注';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "courier_name")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `courier_name` varchar(40) COMMENT '快递公司';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "courier_number")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `courier_number` varchar(20) COMMENT '快递单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "delivery_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `delivery_time` int(11) unsigned NOT NULL COMMENT '发货时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "complete_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `complete_time` int(11) unsigned NOT NULL COMMENT '完成时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "reback")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `reback` text COMMENT '发货备注';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "is_over")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `is_over` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否处理';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "is_settle")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `is_settle` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "pay_status")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `pay_status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '订单支付状态';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "pay_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `pay_time` int(11) unsigned NOT NULL COMMENT '订单支付时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "uniontid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `uniontid` varchar(32) NOT NULL COMMENT '商户订单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "trans_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `trans_id` varchar(32) NOT NULL COMMENT '支付流水号';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "pay_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `pay_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '付款类型：1积分2现金3积分+现金4赠送5抽奖';");
}
if(!pdo_fieldexists("asterye_waimaixia_item_order", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_item_order")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_itemcate", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_itemcate")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_itemcate", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_itemcate")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_itemcate", "shop_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_itemcate")." ADD `shop_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_itemcate", "catename")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_itemcate")." ADD `catename` varchar(50);");
}
if(!pdo_fieldexists("asterye_waimaixia_itemcate", "thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_itemcate")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_itemcate", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_itemcate")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_itemcate", "enabled")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_itemcate")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_itemcate", "cattype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_itemcate")." ADD `cattype` tinyint(1) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_itemcate", "erji")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_itemcate")." ADD `erji` text NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_itemcate", "fid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_itemcate")." ADD `fid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_itemcate", "pingon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_itemcate")." ADD `pingon` tinyint(1) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_itemcate", "editpingon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_itemcate")." ADD `editpingon` tinyint(1) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind", "bind_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind")." ADD `bind_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind")." ADD `openid` varchar(64) NOT NULL COMMENT '用户OPENID';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind", "active_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind")." ADD `active_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '活跃时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind")." ADD `type` varchar(10);");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind", "ad_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind")." ADD `ad_id` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind", "link_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind")." ADD `link_title` varchar(64) NOT NULL COMMENT '图文标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind", "link_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind")." ADD `link_desc` varchar(64) NOT NULL COMMENT '图文描述';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind", "link_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind")." ADD `link_thumb` varchar(256) NOT NULL COMMENT '图文图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind", "link_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind")." ADD `link_url` varchar(256) NOT NULL COMMENT '图文链接';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind", "content")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind")." ADD `content` text COMMENT '内容';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind_u", "bind_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind_u")." ADD `bind_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind_u", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind_u")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind_u", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind_u")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind_u", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind_u")." ADD `openid` varchar(64) NOT NULL COMMENT '用户OPENID';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind_u", "active_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind_u")." ADD `active_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '活跃时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind_u", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind_u")." ADD `type` varchar(10);");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind_u", "ad_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind_u")." ADD `ad_id` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind_u", "link_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind_u")." ADD `link_title` varchar(64) NOT NULL COMMENT '图文标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind_u", "link_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind_u")." ADD `link_desc` varchar(64) NOT NULL COMMENT '图文描述';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind_u", "link_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind_u")." ADD `link_thumb` varchar(256) NOT NULL COMMENT '图文图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind_u", "link_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind_u")." ADD `link_url` varchar(256) NOT NULL COMMENT '图文链接';");
}
if(!pdo_fieldexists("asterye_waimaixia_kefubind_u", "content")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_kefubind_u")." ADD `content` text COMMENT '内容';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieapi", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieapi")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_movieapi", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieapi")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieapi", "apisecret")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieapi")." ADD `apisecret` varchar(64) COMMENT 'apisecret';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieapi", "wxno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieapi")." ADD `wxno` varchar(50) COMMENT '微信号';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieapi", "alipayno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieapi")." ADD `alipayno` varchar(50) COMMENT '支付宝号';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieapi", "realname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieapi")." ADD `realname` varchar(50) COMMENT '真实姓名';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieapi", "mobile")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieapi")." ADD `mobile` varchar(20) NOT NULL COMMENT '手机号码';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `user_id` int(11) unsigned NOT NULL COMMENT '用户id';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `openid` varchar(64) NOT NULL COMMENT '用户OPENID';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `unionid` varchar(64) COMMENT '用户unionid';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "api_appKey")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `api_appKey` varchar(20) NOT NULL COMMENT 'api_appKey';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "appKey")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `appKey` varchar(20) NOT NULL COMMENT '下单appKey';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "userOrderId")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `userOrderId` varchar(64) NOT NULL COMMENT '用户方的订单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "thirdOrderId")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `thirdOrderId` varchar(64) NOT NULL COMMENT '接入方的订单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "orderStatus")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `orderStatus` varchar(10) NOT NULL COMMENT '订单状态：2-受理中，3-待出票，4-已出票待结算，5-已结算，10-订单关闭';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "orderStatusStr")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `orderStatusStr` varchar(64) NOT NULL COMMENT '订单状态说明';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "initPrice")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `initPrice` int(10) unsigned NOT NULL COMMENT '订单市场价：分';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "orderPrice")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `orderPrice` int(10) unsigned NOT NULL COMMENT '订单成本价：分，接入方可拿次字段作为下单成本价';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "realorderPrice")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `realorderPrice` int(10) unsigned NOT NULL COMMENT '平台方订单成本价';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "callbacktime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `callbacktime` int(11) unsigned NOT NULL COMMENT '平台方订单状态回调时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "filmId")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `filmId` int(10) unsigned NOT NULL COMMENT '影片id';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "filmName")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `filmName` varchar(32) NOT NULL COMMENT '片名';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "filmPic")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `filmPic` varchar(256) NOT NULL COMMENT '影片图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "cinemaId")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `cinemaId` int(10) unsigned NOT NULL COMMENT '电影院id';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "cinemaName")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `cinemaName` varchar(64) NOT NULL COMMENT '电影院名';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "cinemaAddress")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `cinemaAddress` varchar(256) NOT NULL COMMENT '电影院地址';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "hallName")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `hallName` varchar(64) NOT NULL COMMENT '厅名';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "showTime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `showTime` varchar(32) NOT NULL COMMENT '放映时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "stopSellTime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `stopSellTime` varchar(32) NOT NULL COMMENT '停售时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "showId")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `showId` varchar(128) NOT NULL COMMENT '场次id';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "seat")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `seat` varchar(256) NOT NULL COMMENT '座位：英文逗号隔开';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "seatId")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `seatId` varchar(512) NOT NULL COMMENT '座位ID：|隔开';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "seatArea")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `seatArea` varchar(64) NOT NULL COMMENT '座位区域：|隔开';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "seatNo")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `seatNo` varchar(256) NOT NULL COMMENT '座位：|隔开';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "realSeat")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `realSeat` varchar(256) NOT NULL COMMENT '实际座位：英文逗号隔开';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "ticketCode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `ticketCode` text COMMENT '取票码';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "ticketImage")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `ticketImage` text COMMENT '取票二维码';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "orderNum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `orderNum` varchar(10) NOT NULL COMMENT '座位数';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "reservedPhone")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `reservedPhone` varchar(11) NOT NULL COMMENT '下单预留手机号码';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "acceptChangeSeat")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `acceptChangeSeat` int(2) unsigned NOT NULL COMMENT '是否允许调座1允许0不允许';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "createTime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `createTime` varchar(32) NOT NULL COMMENT '下单时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "readyTicketTime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `readyTicketTime` varchar(32) NOT NULL COMMENT '待出票时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "ticketTime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `ticketTime` varchar(32) NOT NULL COMMENT '出票时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "closeTime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `closeTime` varchar(32) NOT NULL COMMENT '关闭时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "closeCause")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `closeCause` varchar(64) NOT NULL COMMENT '关闭原因';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "ticektCode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `ticektCode` text COMMENT '取票码，type为1时，为字符串，type为2时，为取票码原始截图。 理论上一个取票码包含各字符串和原始截图， 原始截图可能不和字符串同步返回，有滞后性。';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "pay_status")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `pay_status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '订单支付状态';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "third")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `third` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '1为已发送到第三方出票';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "pay_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `pay_time` int(11) unsigned NOT NULL COMMENT '订单支付时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "uniontid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `uniontid` varchar(32) NOT NULL COMMENT '商户订单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "trans_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `trans_id` varchar(32) NOT NULL COMMENT '支付流水号';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "downDiscountRate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `downDiscountRate` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '小于39元成本折扣';");
}
if(!pdo_fieldexists("asterye_waimaixia_movieorder", "upDiscountRate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_movieorder")." ADD `upDiscountRate` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '大于39元成本折扣';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `title` varchar(255) DEFAULT '' COMMENT '标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "bg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `bg` varchar(255) DEFAULT '' COMMENT '背景';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "data")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `data` text COMMENT '位置数据';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "isopen")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `isopen` tinyint(3) DEFAULT '0' COMMENT '是否开启';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `createtime` int(11) DEFAULT '0' COMMENT '时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '1为海报2为商品';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "poster_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `poster_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '海报类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `cateid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '海报分类';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "shop_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `shop_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "content")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `content` varchar(500) COMMENT '海报文案';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "xcx_path")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `xcx_path` varchar(500) COMMENT '小程序路径';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "gzh_reply_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `gzh_reply_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '公众号回复类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "link_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `link_title` varchar(50) NOT NULL COMMENT 'H5图文链接标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "link_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `link_desc` varchar(50) NOT NULL COMMENT 'H5图文链接描述文字';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "link_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `link_thumb` varchar(256) NOT NULL COMMENT 'H5图文链接图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "link_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `link_url` varchar(500) NOT NULL COMMENT 'H5图文链接URL';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "card_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `card_title` varchar(50) NOT NULL COMMENT '小程序卡片标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "card_path")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `card_path` varchar(50) NOT NULL COMMENT '小程序卡片路径';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "card_thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `card_thumb` varchar(256) NOT NULL COMMENT '小程序卡片图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "mall_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `mall_type` varchar(20) NOT NULL COMMENT '电商平台';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "goods_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `goods_id` varchar(256) NOT NULL COMMENT '商品id';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "goods_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `goods_title` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "goods_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `goods_desc` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "goods_photos")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `goods_photos` varchar(3000) NOT NULL COMMENT '商品图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "is_gzh")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `is_gzh` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否关注公众号显示';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "is_tjr")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `is_tjr` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否有推荐人显示';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "system_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `system_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '手机平台';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "shopavatar")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `shopavatar` varchar(256) NOT NULL COMMENT '平台图标';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "shopname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `shopname` varchar(50) NOT NULL COMMENT '平台名称';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "replay_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `replay_text` text COMMENT '回复文字内容';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "keyword")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `keyword` varchar(255) DEFAULT '' COMMENT '触发关键词';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "url_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `url_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'H5链接内容id';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "goods_photo")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `goods_photo` varchar(256) NOT NULL COMMENT '商品本地图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "waittext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `waittext` varchar(255) DEFAULT '' COMMENT '海报等待文字';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "oktext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `oktext` varchar(255) DEFAULT '' COMMENT '海报成功文字';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "sub_sendval")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `sub_sendval` text COMMENT '回复文字内容';");
}
if(!pdo_fieldexists("asterye_waimaixia_newposter", "goods_replay_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_newposter")." ADD `goods_replay_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '公众号回复类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "pingtai")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `pingtai` varchar(20) NOT NULL COMMENT '平台';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "pingtai_name")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `pingtai_name` varchar(20) NOT NULL COMMENT '平台名';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "order_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `order_type` varchar(20) NOT NULL COMMENT '订单类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "order_status")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `order_status` int(3) NOT NULL DEFAULT '0' COMMENT '订单状态';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "order_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `order_id` varchar(50) NOT NULL COMMENT '子订单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "order_id_fa")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `order_id_fa` varchar(50) NOT NULL COMMENT '主订单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "goods_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `goods_id` varchar(50) NOT NULL COMMENT '商品id';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "order_create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `order_create_time` varchar(10) NOT NULL COMMENT '订单创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "order_paid_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `order_paid_time` varchar(10) NOT NULL COMMENT '订单付款时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "billingDate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `billingDate` varchar(10) NOT NULL COMMENT '分销联盟账期时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "tk_earning_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `tk_earning_time` varchar(10) NOT NULL COMMENT '淘宝订单结算时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "order_settlement_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `order_settlement_time` varchar(10) NOT NULL COMMENT '订单结算时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "shopname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `shopname` varchar(30) NOT NULL COMMENT '店铺名';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "goods_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `goods_title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "goods_img")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `goods_img` varchar(255) NOT NULL COMMENT '商品图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "order_price")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `order_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "order_profit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `order_profit` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "sid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `sid` varchar(20) NOT NULL COMMENT '订单侠渠道标识';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "adzone_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `adzone_id` varchar(20) NOT NULL COMMENT 'pid=mm_1_2_3中的“3”这段数字';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "site_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `site_id` varchar(20) NOT NULL COMMENT 'pid=mm_1_2_3中的“2”这段数字';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "relation_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `relation_id` varchar(20) NOT NULL COMMENT '渠道id';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "alimama_rate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `alimama_rate` varchar(20) NOT NULL COMMENT '阿里妈妈技术服务费比例';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "income_rate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `income_rate` varchar(20) NOT NULL COMMENT '佣金比例';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_1")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_1` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '自买佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_1_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_1_uid` int(11) NOT NULL DEFAULT '0' COMMENT '自买UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_1_unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_1_unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_2` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '一级佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_2_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_2_uid` int(11) NOT NULL DEFAULT '0' COMMENT '一级UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_2_unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_2_unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_3")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_3` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '二级佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_3_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_3_uid` int(11) NOT NULL DEFAULT '0' COMMENT '二级UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_3_unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_3_unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_t")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_t` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_t_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_t_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_2t")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_2t` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_2t_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_2t_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_1h")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_1h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_1h_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_1h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_2h")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_2h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_2h_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_2h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_3h")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_3h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_3h_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_3h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_4h")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_4h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_4h_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_4h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_t_unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_t_unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_h")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_h_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c1_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c1_uid` int(11) NOT NULL DEFAULT '0' COMMENT '自买UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "new")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `new` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "is_notice")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `is_notice` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否通知';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "order_finish_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `order_finish_time` int(10) NOT NULL DEFAULT '0' COMMENT '订单完成时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_1_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_1_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_2_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_2_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_3_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_3_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_t_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_t_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_2t_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_2t_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_1h_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_1h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_2h_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_2h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_3h_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_3h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order", "c_4h_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order")." ADD `c_4h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `uniacid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "pingtai")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `pingtai` varchar(20) NOT NULL COMMENT '平台';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "pingtai_name")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `pingtai_name` varchar(20) NOT NULL COMMENT '平台名';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "order_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `order_type` varchar(20) NOT NULL COMMENT '订单类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "order_status")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `order_status` int(3) NOT NULL DEFAULT '0' COMMENT '订单状态';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "order_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `order_id` varchar(50) NOT NULL COMMENT '子订单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "order_id_fa")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `order_id_fa` varchar(50) NOT NULL COMMENT '主订单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "goods_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `goods_id` varchar(50) NOT NULL COMMENT '商品id';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "order_create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `order_create_time` varchar(10) NOT NULL COMMENT '订单创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "order_paid_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `order_paid_time` varchar(10) NOT NULL COMMENT '订单付款时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "billingDate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `billingDate` varchar(10) NOT NULL COMMENT '分销联盟账期时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "tk_earning_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `tk_earning_time` varchar(10) NOT NULL COMMENT '淘宝订单结算时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "order_settlement_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `order_settlement_time` varchar(10) NOT NULL COMMENT '订单结算时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "shopname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `shopname` varchar(30) NOT NULL COMMENT '店铺名';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "goods_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `goods_title` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "goods_img")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `goods_img` varchar(255) NOT NULL COMMENT '商品图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "order_price")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `order_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "order_profit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `order_profit` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "sid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `sid` varchar(20) NOT NULL COMMENT '订单侠渠道标识';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "adzone_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `adzone_id` varchar(20) NOT NULL COMMENT 'pid=mm_1_2_3中的“3”这段数字';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "site_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `site_id` varchar(20) NOT NULL COMMENT 'pid=mm_1_2_3中的“2”这段数字';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "relation_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `relation_id` varchar(20) NOT NULL COMMENT '渠道id';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "alimama_rate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `alimama_rate` varchar(20) NOT NULL COMMENT '阿里妈妈技术服务费比例';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "income_rate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `income_rate` varchar(20) NOT NULL COMMENT '佣金比例';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_1")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_1` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '自买佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_1_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_1_uid` int(11) NOT NULL DEFAULT '0' COMMENT '自买UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_1_unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_1_unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_2")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_2` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '一级佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_2_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_2_uid` int(11) NOT NULL DEFAULT '0' COMMENT '一级UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_2_unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_2_unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_3")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_3` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '二级佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_3_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_3_uid` int(11) NOT NULL DEFAULT '0' COMMENT '二级UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_3_unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_3_unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_t")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_t` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_t_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_t_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_t_unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_t_unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_2t")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_2t` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_2t_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_2t_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_1h")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_1h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_1h_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_1h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_2h")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_2h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_2h_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_2h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_3h")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_3h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_3h_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_3h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_4h")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_4h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_4h_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_4h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_h")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_h` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '团长佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_h_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_h_uid` int(11) NOT NULL DEFAULT '0' COMMENT '团长UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c1_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c1_uid` int(11) NOT NULL DEFAULT '0' COMMENT '自买UID';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "new")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `new` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "is_notice")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `is_notice` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否通知';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "order_finish_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `order_finish_time` int(10) NOT NULL DEFAULT '0' COMMENT '订单完成时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_1_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_1_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_2_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_2_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_3_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_3_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_t_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_t_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_2t_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_2t_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_1h_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_1h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_2h_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_2h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_3h_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_3h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_order_u", "c_4h_c")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_order_u")." ADD `c_4h_c` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自买积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "page_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `page_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `title` varchar(128) NOT NULL COMMENT '标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `thumb` varchar(256) COMMENT '封面图';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "avatar")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `avatar` varchar(256) COMMENT '作者头像';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "name")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `name` varchar(50) COMMENT '作者昵称';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `desc` varchar(256) COMMENT '分享描述';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "content")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `content` text COMMENT '文章内容';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "click")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `click` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '浏览次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '发布时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "post_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `post_time` int(11) unsigned NOT NULL COMMENT '发布时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `displayorder` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_page", "is_show")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_page")." ADD `is_show` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "pid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `pid` varchar(50);");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "sid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `sid` varchar(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "rid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `rid` varchar(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "pidname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `pidname` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "medianame")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `medianame` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "nickname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `nickname` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `openid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `unionid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `uid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "is_use")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `is_use` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "use_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `use_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pid", "update_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid")." ADD `update_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "pid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `pid` varchar(50);");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "sid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `sid` varchar(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "rid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `rid` varchar(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "pidname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `pidname` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "medianame")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `medianame` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "nickname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `nickname` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `openid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `unionid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `uid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "is_use")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `is_use` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "use_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `use_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pid_u", "update_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pid_u")." ADD `update_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "pid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `pid` varchar(50);");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "sid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `sid` varchar(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "rid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `rid` varchar(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "pidname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `pidname` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "medianame")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `medianame` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "nickname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `nickname` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `openid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `unionid` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `uid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "is_use")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `is_use` int(2) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "use_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `use_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_pidlog", "update_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_pidlog")." ADD `update_time` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `uid` varchar(255) DEFAULT '' COMMENT '我的uid';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "posterid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `posterid` int(11) DEFAULT '0' COMMENT '海报id';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "from_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `from_uid` varchar(255) DEFAULT '' COMMENT '邀请人uid';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "subcredit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `subcredit` int(11) DEFAULT '0' COMMENT '关注者积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "reccredit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `reccredit` int(11) DEFAULT '0' COMMENT '推荐人积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `createtime` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "recmoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `recmoney` decimal(10,2) DEFAULT '0.00' COMMENT '推荐人余额';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "submoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `submoney` decimal(10,2) DEFAULT '0.00' COMMENT '关注者余额';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_log", "isunsub")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_log")." ADD `isunsub` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否取消关注';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `id` int(10) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `uniacid` int(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `uid` int(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `openid` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `createtime` int(10) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "scancodenum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `scancodenum` int(10) NOT NULL DEFAULT '0' COMMENT '总扫码次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "randomnum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `randomnum` int(10) NOT NULL DEFAULT '0' COMMENT '总随机触发数';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "level")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `level` tinyint(1) NOT NULL DEFAULT '0' COMMENT '等级 0本身 1级  2级 3级';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "level1_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `level1_uid` int(10) NOT NULL DEFAULT '0' COMMENT '等级1会员id';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "level2_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `level2_uid` int(10) NOT NULL DEFAULT '0' COMMENT '等级2会员id';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "level3_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `level3_uid` int(10) NOT NULL DEFAULT '0' COMMENT '等级3会员id';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "nickname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `nickname` varbinary(100) NOT NULL DEFAULT '' COMMENT '会员昵称';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "parentid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `parentid` int(11) NOT NULL DEFAULT '0' COMMENT '父级id';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "level_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `level_num` int(11) NOT NULL DEFAULT '0' COMMENT '无限极 0 初级  大于0 级数';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "misterid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `misterid` int(11) NOT NULL DEFAULT '0' COMMENT '源头';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "isceshi")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `isceshi` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否测试数据';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_member", "ranking")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_member")." ADD `ranking` int(11) NOT NULL DEFAULT '0' COMMENT '排名';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `type` tinyint(3) DEFAULT '0' COMMENT '0关注海报';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `title` varchar(255) DEFAULT '' COMMENT '标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "bg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `bg` varchar(255) DEFAULT '' COMMENT '背景';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "data")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `data` text COMMENT '位置数据';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "keyword")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `keyword` varchar(255) DEFAULT '' COMMENT '触发关键词';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "times")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `times` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "follows")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `follows` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "isdefault")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `isdefault` tinyint(3) DEFAULT '0' COMMENT '是否默认 1是 0否';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "resptitle")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `resptitle` varchar(255) DEFAULT '' COMMENT '推送标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "respthumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `respthumb` varchar(255) DEFAULT '' COMMENT '推送图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `createtime` int(11) DEFAULT '0' COMMENT '推送时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "respdesc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `respdesc` varchar(255) DEFAULT '' COMMENT '推送内容';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "respurl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `respurl` varchar(255) DEFAULT '' COMMENT '推送url';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "waittext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `waittext` varchar(255) DEFAULT '' COMMENT '等待提示';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "oktext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `oktext` varchar(255) DEFAULT '' COMMENT '制作成功提示';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subcredit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subcredit` int(11) DEFAULT '0' COMMENT '关注者获得积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "submoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `submoney` decimal(10,2) DEFAULT '0.00' COMMENT '关注者获得金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "reccredit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `reccredit` int(11) DEFAULT '0' COMMENT '推荐人获得积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "recmoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `recmoney` decimal(10,2) DEFAULT '0.00' COMMENT '推荐人获得金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "paytype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `paytype` tinyint(1) DEFAULT '0' COMMENT '奖励现金方式 0余额 1微信钱包';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "scantext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `scantext` varchar(255) DEFAULT '' COMMENT '推荐者通知';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subtext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subtext` varchar(255) DEFAULT '' COMMENT '关注者通知';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "beagent")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `beagent` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "bedown")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `bedown` tinyint(3) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "isopen")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `isopen` tinyint(3) DEFAULT '0' COMMENT '是否开启';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "opentext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `opentext` varchar(255) DEFAULT '' COMMENT '未开放时候的提示';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "openurl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `openurl` varchar(255) DEFAULT '' COMMENT '未开放时候的说明连接';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "templateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `templateid` varchar(255) DEFAULT '' COMMENT '通知模板消息ID（任务处理通知）';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subpaycontent")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subpaycontent` text COMMENT '您通过 [nickname]的推广二维码扫码关注的奖励';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "recpaycontent")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `recpaycontent` text COMMENT '推荐 [nickname] 扫码关注的奖励';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "entrytext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `entrytext` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "reccouponid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `reccouponid` int(11) DEFAULT '0' COMMENT '推送者送优惠券ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "reccouponnum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `reccouponnum` int(11) DEFAULT '0' COMMENT '推送者送优惠券数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subcouponid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subcouponid` int(11) DEFAULT '0' COMMENT '关注者送优惠券ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subcouponnum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subcouponnum` int(11) DEFAULT '0' COMMENT '关注者送优惠券数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "random")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `random` int(10) NOT NULL DEFAULT '0' COMMENT '随机次数  n次之后重0开始 触发一次';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "sendtype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `sendtype` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'n次后触发发送类型 0链接 1二维码 2图文';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "sendval")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `sendval` varchar(255) NOT NULL DEFAULT '' COMMENT '推送者链接文字';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "sendurl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `sendurl` varchar(255) NOT NULL DEFAULT '' COMMENT '推送者链接';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "followval")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `followval` varchar(255) NOT NULL DEFAULT '' COMMENT '关注着链接文字';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "followurl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `followurl` varchar(255) NOT NULL DEFAULT '' COMMENT '关注者链接';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "sendcode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `sendcode` varchar(255) NOT NULL DEFAULT '' COMMENT '推送者二维码';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "followcode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `followcode` varchar(255) NOT NULL DEFAULT '' COMMENT '关注者二维码';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "rec_credit_random")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `rec_credit_random` int(10) NOT NULL DEFAULT '0' COMMENT '随机数到达后赠送推送者积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "rec_money_random")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `rec_money_random` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '随机数到达后赠送推送者金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "relaystart")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `relaystart` int(11) NOT NULL DEFAULT '0' COMMENT '接力起始值';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "pcate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `pcate` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "ccate")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `ccate` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level1_credit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level1_credit` int(10) NOT NULL DEFAULT '0' COMMENT '一级获取积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level2_credit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level2_credit` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level3_credit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level3_credit` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level1_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level1_money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level2_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level2_money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level3_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level3_money` decimal(10,2) NOT NULL DEFAULT '0.00';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level0_val")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level0_val` varchar(255) NOT NULL DEFAULT '' COMMENT '分销统一提醒文字';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level0_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level0_url` varbinary(255) NOT NULL DEFAULT '' COMMENT '分销统一提醒文字链接';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "level_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `level_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1 一级 2二级 3三级';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "coverimg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `coverimg` varchar(255) NOT NULL DEFAULT '' COMMENT '封面图片';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "isopen_level")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `isopen_level` tinyint(3) DEFAULT '0' COMMENT '是否开启三级营销';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "limitrandom")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `limitrandom` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "isclock")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `isclock` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启打卡 0否 1是';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "clock_start_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `clock_start_time` varchar(10) NOT NULL DEFAULT '' COMMENT '打开开始时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "clock_end_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `clock_end_time` varchar(10) NOT NULL DEFAULT '' COMMENT '打开结束时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "clock_msg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `clock_msg` varbinary(1000) NOT NULL DEFAULT '' COMMENT '打卡成功提醒';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "clock_err")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `clock_err` varbinary(1000) NOT NULL DEFAULT '' COMMENT '错过打卡时间提醒';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "clock_send_credit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `clock_send_credit` int(10) NOT NULL DEFAULT '0' COMMENT '打卡赠送积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "clock_send_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `clock_send_money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '打卡赠送余额';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "reckeyword")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `reckeyword` varchar(20) NOT NULL DEFAULT '' COMMENT '完成邀请关键词';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "minetext")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `minetext` varchar(255) NOT NULL DEFAULT '' COMMENT '自扫了通知';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "next_active_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `next_active_text` varchar(255) NOT NULL DEFAULT '' COMMENT '下一轮提示语';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "scan_random_text")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `scan_random_text` varchar(255) NOT NULL DEFAULT '' COMMENT '随机任务完成通知';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subresptype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subresptype` tinyint(1) NOT NULL DEFAULT '0' COMMENT '关注者回复类型0图文2关键字';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subresp_keyword")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subresp_keyword` varchar(255) NOT NULL DEFAULT '' COMMENT '关注着回复触发关键字';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "isopenauto")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `isopenauto` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启自动生成海报';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "subaudio_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `subaudio_url` varchar(255) NOT NULL DEFAULT '' COMMENT '推送关注者音频链接';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "sub_sendval")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `sub_sendval` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "sub_sendurl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `sub_sendurl` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "isunsubscribe")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `isunsubscribe` tinyint(1) NOT NULL DEFAULT '0' COMMENT '取消关注事件是否开启';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "unsub_sendval")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `unsub_sendval` varchar(255) NOT NULL DEFAULT '' COMMENT '取消关注推送给上级内容';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "israndomimg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `israndomimg` tinyint(1) NOT NULL DEFAULT '0' COMMENT '图片是否随机抽取0否1是';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "randomimgs")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `randomimgs` text COMMENT '随机图片抽取地址序列化';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "ischeckpwd")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `ischeckpwd` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启密码验证';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "password")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `password` varchar(255) NOT NULL DEFAULT '' COMMENT '海报校验密码';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "pwdfail")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `pwdfail` varchar(255) NOT NULL DEFAULT '' COMMENT '错误提示';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "pwdinfo")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `pwdinfo` varchar(255) NOT NULL DEFAULT '' COMMENT '输入密码提示：例如请输入密码';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "is_parent_info")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `is_parent_info` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启获取一级用户信息';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "parent_info")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `parent_info` varchar(255) NOT NULL DEFAULT '' COMMENT '获取一级用户信息通知';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "send_poster")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `send_poster` text COMMENT '返回推荐者海报信息数据';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "groupid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `groupid` varchar(150) NOT NULL DEFAULT '' COMMENT '粉丝自动打标签';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "is_groupid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `is_groupid` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启自动分组';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_poster", "reckeyword_prefix")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_poster")." ADD `reckeyword_prefix` varchar(10) NOT NULL DEFAULT '' COMMENT '邀请码前缀';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `uniacid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `uid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "sceneid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `sceneid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "mediaid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `mediaid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "ticket")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `ticket` varchar(250) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `url` varchar(80) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `createtime` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "qrimg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `qrimg` varchar(1000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "scenestr")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `scenestr` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "posterid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `posterid` int(10) NOT NULL DEFAULT '0' COMMENT '海报id';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `openid` varchar(100) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "file")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `file` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "nums")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `nums` int(10) NOT NULL DEFAULT '0' COMMENT '扫码总次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "finish_random_nums")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `finish_random_nums` int(10) NOT NULL DEFAULT '0' COMMENT '当前海报统计邀请任务完成次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "randomnum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `randomnum` int(10) NOT NULL DEFAULT '0' COMMENT '随机记录数';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "updateday")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `updateday` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间当前';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "updatetime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `updatetime` varchar(20) NOT NULL DEFAULT '' COMMENT '更新时间 时分';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "updatenum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `updatenum` int(10) NOT NULL DEFAULT '0' COMMENT '每天更新一次累加';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "clock_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `clock_num` int(10) NOT NULL DEFAULT '0' COMMENT '打卡统计累加';");
}
if(!pdo_fieldexists("asterye_waimaixia_plugin_gzh_qr", "reccode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_plugin_gzh_qr")." ADD `reccode` varchar(10) NOT NULL DEFAULT '' COMMENT '推荐码';");
}
if(!pdo_fieldexists("asterye_waimaixia_poster", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_poster")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_poster", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_poster")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_poster", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_poster")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_poster", "cateid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_poster")." ADD `cateid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '海报类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_poster", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_poster")." ADD `type` tinyint(3) DEFAULT '0' COMMENT '0小程序码，1公众号码';");
}
if(!pdo_fieldexists("asterye_waimaixia_poster", "title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_poster")." ADD `title` varchar(255) DEFAULT '' COMMENT '标题';");
}
if(!pdo_fieldexists("asterye_waimaixia_poster", "bg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_poster")." ADD `bg` varchar(255) DEFAULT '' COMMENT '背景';");
}
if(!pdo_fieldexists("asterye_waimaixia_poster", "data")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_poster")." ADD `data` text COMMENT '位置数据';");
}
if(!pdo_fieldexists("asterye_waimaixia_poster", "isopen")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_poster")." ADD `isopen` tinyint(3) DEFAULT '0' COMMENT '是否开启';");
}
if(!pdo_fieldexists("asterye_waimaixia_poster", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_poster")." ADD `createtime` int(11) DEFAULT '0' COMMENT '时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_postercate", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_postercate")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_postercate", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_postercate")." ADD `uniacid` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_postercate", "shop_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_postercate")." ADD `shop_id` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_postercate", "catename")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_postercate")." ADD `catename` varchar(50);");
}
if(!pdo_fieldexists("asterye_waimaixia_postercate", "thumb")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_postercate")." ADD `thumb` varchar(255) DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_postercate", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_postercate")." ADD `displayorder` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_postercate", "enabled")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_postercate")." ADD `enabled` int(11) DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_postercate", "cattype")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_postercate")." ADD `cattype` tinyint(1) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_postercate", "erji")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_postercate")." ADD `erji` text NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_postercate", "fid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_postercate")." ADD `fid` int(11) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_postercate", "pingon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_postercate")." ADD `pingon` tinyint(1) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_postercate", "editpingon")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_postercate")." ADD `editpingon` tinyint(1) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `uniacid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `uid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `openid` varchar(64) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `type` tinyint(3) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "sceneid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `sceneid` int(11) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "mediaid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `mediaid` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "ticket")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `ticket` varchar(250) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `url` varchar(80) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `createtime` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "qrimg")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `qrimg` varchar(1000) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "scenestr")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `scenestr` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "posterid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `posterid` int(10) NOT NULL DEFAULT '0' COMMENT '海报id';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "file")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `file` varchar(255) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "mall_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `mall_type` varchar(20) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "goods_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `goods_id` varchar(50) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "goods_title")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `goods_title` varchar(200) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "goods_desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `goods_desc` varchar(100) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "goods_photo")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `goods_photo` varchar(255) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_qr", "xcxuniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_qr")." ADD `xcxuniacid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_scene", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_scene")." ADD `id` int(11) NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_scene", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_scene")." ADD `uniacid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_scene", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_scene")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_scene", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_scene")." ADD `uid` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_scene", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_scene")." ADD `openid` varchar(64) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("asterye_waimaixia_scene", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_scene")." ADD `unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_scene", "scenestr")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_scene")." ADD `scenestr` varchar(32) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_scene", "scenedata")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_scene")." ADD `scenedata` varchar(500) NOT NULL DEFAULT '';");
}
if(!pdo_fieldexists("asterye_waimaixia_scene", "createtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_scene")." ADD `createtime` int(10) NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_subscribemessage", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_subscribemessage")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_subscribemessage", "adid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_subscribemessage")." ADD `adid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_subscribemessage", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_subscribemessage")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_subscribemessage", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_subscribemessage")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_subscribemessage", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_subscribemessage")." ADD `openid` varchar(64) NOT NULL COMMENT '用户OPENID';");
}
if(!pdo_fieldexists("asterye_waimaixia_subscribemessage", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_subscribemessage")." ADD `unionid` varchar(64) NOT NULL COMMENT '用户unionid';");
}
if(!pdo_fieldexists("asterye_waimaixia_subscribemessage", "s_1_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_subscribemessage")." ADD `s_1_num` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '提醒剩余次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_subscribemessage", "warm_daytime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_subscribemessage")." ADD `warm_daytime` int(11) unsigned NOT NULL COMMENT '提醒订阅时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_subscribemessage", "warm_daynum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_subscribemessage")." ADD `warm_daynum` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '提醒当天次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_subscribemessage", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_subscribemessage")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_systemlog", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_systemlog")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_systemlog", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_systemlog")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_systemlog", "api_appKey")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_systemlog")." ADD `api_appKey` varchar(20) NOT NULL COMMENT 'api_appKey';");
}
if(!pdo_fieldexists("asterye_waimaixia_systemlog", "apiname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_systemlog")." ADD `apiname` varchar(64) NOT NULL COMMENT 'apiname';");
}
if(!pdo_fieldexists("asterye_waimaixia_systemlog", "log")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_systemlog")." ADD `log` mediumtext COMMENT '接口log';");
}
if(!pdo_fieldexists("asterye_waimaixia_systemlog", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_systemlog")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "task_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `task_id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "user_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `user_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '任务会员类型，0普通用户任务，1团长任务，2合伙人任务';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "task_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `task_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '任务类型，0普通任务，1新人任务，2老带新';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "new_task_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `new_task_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '任务类型，0自购出单';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "new_task_day")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `new_task_day` int(11) unsigned NOT NULL COMMENT '有效天数';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "new_task_order_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `new_task_order_money` int(11) unsigned NOT NULL COMMENT '自购出单订单最低金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "new_task_up_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `new_task_up_money` varchar(256) DEFAULT '0' COMMENT '自购出单奖励金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "new_task_up_credit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `new_task_up_credit` varchar(256) DEFAULT '0' COMMENT '自购出单奖励积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "new_task_up_money_fa")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `new_task_up_money_fa` varchar(256) DEFAULT '0' COMMENT '自购出单直推上级奖励金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "new_task_up_credit_fa")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `new_task_up_credit_fa` varchar(256) DEFAULT '0' COMMENT '自购出单直推上级奖励积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "name")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `name` varchar(32) COMMENT '任务名称';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "start_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `start_time` int(11) unsigned NOT NULL COMMENT '任务开始时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "end_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `end_time` int(11) unsigned NOT NULL COMMENT '任务结束时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "invite_sum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `invite_sum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推人数';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "invite_allsum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `invite_allsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推人数';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "invite_yxsum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `invite_yxsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效直推人数';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "invite_yxallsum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `invite_yxallsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效间推人数';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "invite_tuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `invite_tuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推团长数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "invite_alltuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `invite_alltuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推团长数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "invite_he")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `invite_he` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推合伙人数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "invite_allhe")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `invite_allhe` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推合伙人数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "order_sum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `order_sum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自购订单数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "invite_order")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `invite_order` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推订单数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "invite_allorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `invite_allorder` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推订单数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '自购佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "invite_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `invite_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '直推佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "invite_allmoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `invite_allmoney` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '间推佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "allmoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `allmoney` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '总佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "up_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `up_type` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '完成任务奖励类型：0不升级，1升级团长，2升级合伙人';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "up_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `up_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '奖励金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "up_credit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `up_credit` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '奖励积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "is_retask")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `is_retask` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否重复任务';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "re_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `re_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '重复次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "status")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '任务状态，1进行中，0未开始/已结束';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "lq_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `lq_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '任务领取类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "is_lq")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `is_lq` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否领取';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "item_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `item_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '积分奖品id';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "page_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `page_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '任务说明文章id';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `url` varchar(256) COMMENT '任务说明url';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "desc")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `desc` varchar(100) COMMENT '奖励说明';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "bglineColor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `bglineColor` varchar(10) COMMENT '滑块背景线条颜色';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "bglineAColor")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `bglineAColor` varchar(10) COMMENT '滑块背景线条激活颜色';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "barBgColor_left")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `barBgColor_left` varchar(10) COMMENT '滑块背景颜色-左';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "barBgColor_right")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `barBgColor_right` varchar(10) COMMENT '滑块背景颜色-右';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "BgColor_wl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `BgColor_wl` varchar(10) COMMENT '未领取背景色';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "BgColor_yl")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `BgColor_yl` varchar(10) COMMENT '已领取背景色';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "desc_color")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `desc_color` varchar(10) COMMENT '进度条下方奖励说明文字颜色';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "jp_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `jp_url` varchar(256) COMMENT '奖品说明图标';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "lq_url")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `lq_url` varchar(256) COMMENT '领取图标';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "is_online")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `is_online` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否在前端显示';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "displayorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `displayorder` int(11) unsigned NOT NULL COMMENT '排序';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_task", "content")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task")." ADD `content` text COMMENT '说明内容';");
}
if(!pdo_fieldexists("asterye_waimaixia_task_temp", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task_temp")." ADD `id` int(10) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_task_temp", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task_temp")." ADD `uniacid` int(11) NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_task_temp", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task_temp")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_task_temp", "task_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task_temp")." ADD `task_id` int(11) COMMENT '抽奖ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_task_temp", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task_temp")." ADD `user_id` int(11) NOT NULL COMMENT '用户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_task_temp", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task_temp")." ADD `openid` varchar(64) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("asterye_waimaixia_task_temp", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task_temp")." ADD `unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_task_temp", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task_temp")." ADD `type` int(2) DEFAULT '0' COMMENT '1，现金 2，积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_task_temp", "addtime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_task_temp")." ADD `addtime` char(11) COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `user_id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `uid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `openid` varchar(64) NOT NULL COMMENT '用户OPENID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "utmMedium")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `utmMedium` varchar(64) NOT NULL COMMENT 'utmMedium';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "parent_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "parent2_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `parent2_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '2级推荐ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "parent_1tid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `parent_1tid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '1级团长ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "parent_2tid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `parent_2tid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '2级团长ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "parent_1hid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `parent_1hid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '1级合伙人ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "parent_2hid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `parent_2hid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '2级合伙人ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "parent_hid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `parent_hid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父合伙人ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "parent_unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `parent_unionid` varchar(64) NOT NULL COMMENT '推荐UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "is_tuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `is_tuan` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否团长';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "tuan_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `tuan_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '团长类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "nickname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `nickname` varchar(32) COMMENT '昵称';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "avatar")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `avatar` varchar(256) COMMENT '头像';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "money_qrcode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `money_qrcode` varchar(256) COMMENT '收款二维码';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "wxno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `wxno` varchar(50) COMMENT '微信号';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "alipayno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `alipayno` varchar(50) COMMENT '支付宝号';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "realname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `realname` varchar(50) COMMENT '真实姓名';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "mobile")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `mobile` varchar(20) NOT NULL COMMENT '手机号码';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "moviemobile")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `moviemobile` varchar(20) NOT NULL COMMENT '手机号码';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "credit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `credit` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "order_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `order_num` int(6) unsigned NOT NULL DEFAULT '0' COMMENT '订单数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '红包账户';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "allmoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `allmoney` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '红包账户';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `unionid` varchar(64) COMMENT '用户unionid';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "invite_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `invite_uid` varchar(256) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "invite_unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `invite_unionid` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "invite_sum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `invite_sum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "invite_allsum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `invite_allsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "invite_yxsum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `invite_yxsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "invite_yxallsum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `invite_yxallsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "invite_tuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `invite_tuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "invite_alltuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `invite_alltuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "invite_he")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `invite_he` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "invite_allhe")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `invite_allhe` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "new")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `new` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "movie_ticketer")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `movie_ticketer` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '电影票票商';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "movie_tpl_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `movie_tpl_num` int(3) unsigned NOT NULL DEFAULT '0' COMMENT '电影票提醒次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "new_tuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `new_tuan` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "yx")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `yx` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "relation_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `relation_id` varchar(11) COMMENT '用户渠道ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "s_1_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `s_1_num` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '点餐提醒次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "sign_tpl_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `sign_tpl_num` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '签到提醒次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "warm_daytime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `warm_daytime` int(11) unsigned NOT NULL COMMENT '点餐提醒订阅时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "warm_daynum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `warm_daynum` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '点餐提醒当天次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "foodlist")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `foodlist` varchar(256) COMMENT '菜单';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "uptuan_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `uptuan_time` int(11) unsigned NOT NULL COMMENT '升级团长时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "sign_in")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `sign_in` int(11) unsigned NOT NULL COMMENT '签到时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "sign_in_continuity")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `sign_in_continuity` int(10) DEFAULT '0' COMMENT '连续签到天数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "sign_in_sum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `sign_in_sum` int(11) DEFAULT '0' COMMENT '总签到数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "task_address")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `task_address` int(11) DEFAULT '2' COMMENT '1，完成 2，未完成';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "task_taobao")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `task_taobao` int(11) DEFAULT '2' COMMENT '1，完成 2，未完成';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "task_weixin")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `task_weixin` int(11) DEFAULT '2' COMMENT '1，完成 2，未完成';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "movieshow")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `movieshow` mediumtext COMMENT '电影场次';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "is_black")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `is_black` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否黑名单';");
}
if(!pdo_fieldexists("asterye_waimaixia_user", "pdd_auth")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user")." ADD `pdd_auth` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '拼多多是否授权';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_creditlogs", "log_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_creditlogs")." ADD `log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_creditlogs", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_creditlogs")." ADD `uniacid` int(11) NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_creditlogs", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_creditlogs")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_creditlogs", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_creditlogs")." ADD `user_id` int(11) NOT NULL COMMENT '用户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_creditlogs", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_creditlogs")." ADD `openid` varchar(64) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_creditlogs", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_creditlogs")." ADD `unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_creditlogs", "num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_creditlogs")." ADD `num` int(11) NOT NULL DEFAULT '0' COMMENT '变动数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_creditlogs", "last_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_creditlogs")." ADD `last_num` int(11) NOT NULL DEFAULT '0' COMMENT '上次余额';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_creditlogs", "reason")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_creditlogs")." ADD `reason` varchar(32) COMMENT '变动事由';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_creditlogs", "order_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_creditlogs")." ADD `order_id` varchar(50) NOT NULL COMMENT '订单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_creditlogs", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_creditlogs")." ADD `type` int(2) NOT NULL COMMENT 'c_1_2_3_t';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_creditlogs", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_creditlogs")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '变动时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "log_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `uniacid` int(11) NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `user_id` int(11) NOT NULL COMMENT '用户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `openid` varchar(64) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `num` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变动金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "last_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `last_num` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '上次金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "reason")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `reason` varchar(32) COMMENT '变动事由';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "order_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `order_id` varchar(50) NOT NULL COMMENT '订单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `type` int(2) NOT NULL COMMENT 'c_1_2_3_t';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "cash_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `cash_id` int(11) NOT NULL COMMENT '提现ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '变动时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "log_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `uniacid` int(11) NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `user_id` int(11) NOT NULL COMMENT '用户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `openid` varchar(64) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `num` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变动金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "last_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `last_num` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '上次金额';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "reason")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `reason` varchar(32) COMMENT '变动事由';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "order_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `order_id` varchar(50) NOT NULL COMMENT '订单号';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "cash_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `cash_id` int(11) NOT NULL COMMENT '提现ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `type` int(2) NOT NULL COMMENT 'c_1_2_3_t';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_logs_u", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_logs_u")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '变动时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "task_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `task_id` int(11) unsigned NOT NULL COMMENT '任务ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `user_id` int(11) unsigned NOT NULL COMMENT '用户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `unionid` varchar(64) COMMENT '用户unionid';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "user_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `user_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '会员类型，1普通用户任务，2团长任务，3合伙人任务';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "invite_sum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `invite_sum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推人数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "invite_allsum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `invite_allsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推人数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "invite_yxsum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `invite_yxsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效直推人数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "invite_yxallsum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `invite_yxallsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效间推人数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "invite_tuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `invite_tuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推团长数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "invite_alltuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `invite_alltuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推团长数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "invite_he")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `invite_he` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推合伙人数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "invite_allhe")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `invite_allhe` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推合伙人数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "order_sum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `order_sum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '自购订单数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "invite_order")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `invite_order` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '直推订单数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "invite_allorder")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `invite_allorder` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '间推订单数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '自购佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "invite_money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `invite_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '直推佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "invite_allmoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `invite_allmoney` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '间推佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "allmoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `allmoney` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '总佣金';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '被邀请人用户id';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "status")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '任务状态，1已完成，0进行中';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_task", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_task")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `user_id` int(11) unsigned NOT NULL AUTO_INCREMENT;");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `uid` int(11) unsigned NOT NULL DEFAULT '0';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `uniacid` int(11) unsigned NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `openid` varchar(64) NOT NULL COMMENT '用户OPENID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "utmMedium")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `utmMedium` varchar(64) NOT NULL COMMENT 'utmMedium';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "parent_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "parent2_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `parent2_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '2级推荐ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "parent_1tid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `parent_1tid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '1级团长ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "parent_2tid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `parent_2tid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '2级团长ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "parent_1hid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `parent_1hid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '1级合伙人ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "parent_2hid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `parent_2hid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '2级合伙人ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "parent_hid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `parent_hid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父合伙人ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "parent_unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `parent_unionid` varchar(64) NOT NULL COMMENT '推荐UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "is_tuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `is_tuan` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否团长';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "tuan_type")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `tuan_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '团长类型';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "nickname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `nickname` varchar(32) COMMENT '昵称';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "avatar")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `avatar` varchar(256) COMMENT '头像';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "money_qrcode")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `money_qrcode` varchar(256) COMMENT '收款二维码';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "wxno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `wxno` varchar(50) COMMENT '微信号';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "alipayno")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `alipayno` varchar(50) COMMENT '支付宝号';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "realname")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `realname` varchar(50) COMMENT '真实姓名';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "mobile")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `mobile` varchar(20) NOT NULL COMMENT '手机号码';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "moviemobile")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `moviemobile` varchar(20) NOT NULL COMMENT '手机号码';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "order_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `order_num` int(6) unsigned NOT NULL DEFAULT '0' COMMENT '订单数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "money")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '红包账户';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "credit")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `credit` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '积分';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "allmoney")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `allmoney` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '红包账户';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `unionid` varchar(64) NOT NULL COMMENT '用户unionid';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "invite_uid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `invite_uid` varchar(256) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "invite_unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `invite_unionid` varchar(1000) NOT NULL;");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "invite_sum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `invite_sum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "invite_allsum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `invite_allsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "invite_yxsum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `invite_yxsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "invite_yxallsum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `invite_yxallsum` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "invite_tuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `invite_tuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "invite_alltuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `invite_alltuan` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "invite_he")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `invite_he` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "invite_allhe")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `invite_allhe` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "new")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `new` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "movie_ticketer")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `movie_ticketer` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '电影票票商';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "movie_tpl_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `movie_tpl_num` int(3) unsigned NOT NULL DEFAULT '0' COMMENT '电影票提醒次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "new_tuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `new_tuan` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "yx")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `yx` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '推荐数量';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "s_1_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `s_1_num` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '点餐提醒次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "sign_tpl_num")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `sign_tpl_num` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '签到提醒次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "warm_daytime")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `warm_daytime` int(11) unsigned NOT NULL COMMENT '点餐提醒订阅时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "warm_daynum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `warm_daynum` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '点餐提醒当天次数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "relation_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `relation_id` varchar(11) COMMENT '用户渠道ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "foodlist")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `foodlist` varchar(256) COMMENT '菜单';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '创建时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "uptuan_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `uptuan_time` int(11) unsigned NOT NULL COMMENT '升级团长时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "sign_in")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `sign_in` int(11) unsigned NOT NULL COMMENT '签到时间';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "sign_in_continuity")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `sign_in_continuity` int(10) DEFAULT '0' COMMENT '连续签到天数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "sign_in_sum")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `sign_in_sum` int(11) DEFAULT '0' COMMENT '总签到数';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "task_address")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `task_address` int(11) DEFAULT '2' COMMENT '1，完成 2，未完成';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "task_taobao")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `task_taobao` int(11) DEFAULT '2' COMMENT '1，完成 2，未完成';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "task_weixin")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `task_weixin` int(11) DEFAULT '2' COMMENT '1，完成 2，未完成';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "movieshow")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `movieshow` mediumtext COMMENT '电影场次';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "is_black")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `is_black` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否黑名单';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_u", "pdd_auth")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_u")." ADD `pdd_auth` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '拼多多是否授权';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_uplogs", "log_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_uplogs")." ADD `log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_uplogs", "uniacid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_uplogs")." ADD `uniacid` int(11) NOT NULL COMMENT '平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_uplogs", "system_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_uplogs")." ADD `system_id` int(11) unsigned NOT NULL COMMENT '联营平台ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_uplogs", "user_id")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_uplogs")." ADD `user_id` int(11) NOT NULL COMMENT '用户ID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_uplogs", "openid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_uplogs")." ADD `openid` varchar(64) NOT NULL COMMENT 'openid';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_uplogs", "unionid")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_uplogs")." ADD `unionid` varchar(64) NOT NULL COMMENT 'UNIONID';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_uplogs", "is_tuan")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_uplogs")." ADD `is_tuan` int(2) NOT NULL DEFAULT '0' COMMENT '变动等级';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_uplogs", "reason")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_uplogs")." ADD `reason` varchar(32) COMMENT '变动事由';");
}
if(!pdo_fieldexists("asterye_waimaixia_user_uplogs", "create_time")) {
 pdo_query("ALTER TABLE ".tablename("asterye_waimaixia_user_uplogs")." ADD `create_time` int(11) unsigned NOT NULL COMMENT '变动时间';");
}
